Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. markasmith

    Changeable modifiers in a regex

    :-) They are quite complex... the code within the if{} more than the regex itself. Unfortunately I can't do it exactly as you suggest because I need "if $a =~ /blah/ {loads of stuff which is all common to the two checks, and which I don't want to duplicate}", not just "$a =~ /blah/". The...
  2. markasmith

    Changeable modifiers in a regex

    Well it boils down to there being a variable which (by some earlier magic) is now '1' if we are to be case-insensitive, or 0 if case-sensitive. Are the values of $1, $2 etc. available to you as the top level if set by a reg-ex from within a subroutine? I've thought of a way of doing it... if...
  3. markasmith

    Changeable modifiers in a regex

    Hi, Using Perl 5.6.1, I need a reg-ex which is sometimes case-sensitive, sometimes case-insensitive, according to something which happened earlier. I've tried this: $caseSensitiveCharacter = "i"; (or) $caseSensitiveCharacter = ""; [...then...] if (...

Part and Inventory Search

Back
Top