Nov 12, 2003 #1 ability1 Programmer Dec 24, 2002 23 US I know \w will match any "word" character (alphanumerics plus "_". But what would match any "word" character EXCLUDING "_" (the underscore).
I know \w will match any "word" character (alphanumerics plus "_". But what would match any "word" character EXCLUDING "_" (the underscore).
Nov 12, 2003 2 #2 raklet MIS Aug 19, 2003 370 US \w is a shortcut for the pattern class [_0-9a-zA-Z]. So just use the pattern class minus the "_". $match =~ /[0-9a-zA-z]{3}/; will match any three characters that are in the range given. Upvote 0 Downvote
\w is a shortcut for the pattern class [_0-9a-zA-Z]. So just use the pattern class minus the "_". $match =~ /[0-9a-zA-z]{3}/; will match any three characters that are in the range given.