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!

Recent content by Defcon5

  1. Defcon5

    Regex Character Class bug?

    Thanks for the replies. The problem was that Regex stops at the first hit in the previous example. So it saw a "C" as first character, and than checked it against "[^A]" and immediately stopped searching further. I fixed it by doing this: if('CCTAGG' =~ /^[^A]*$/) { print "match"; }
  2. Defcon5

    Regex Character Class bug?

    I can't figure out why the following does not work. if('CCTAGG' =~ /[^A]/) { print "match"; } I would expect that it would not match because the string has a A in it. But it DOES match. Can someone explain this to me? When I remove the carrot (^), than it also matches. Which I expect...

Part and Inventory Search

Back
Top