zero1979 said:
Subject: I need help
) (who does not)
Please put the subject of your post in the Subject of your post. This
subject should have been something along the lines of "What does [^_]
mean in a regexp?"
I am beginner in perl programming and I am curious
wah does it mean. it is regular expresion
^xyz_[A-Z0-9][^_]*$
Start of string, x, y, z, underscore, any character from A through Z or
0 through 9, 0 or more of any characters other than the underscore, end
of string.
I know almost all symbols but I cannot find what [^_] mean in this
context.
Brackets in a regexp delimit a character class. They match one of any
character listed in the brackets (either directly listed, or as part of
a range, like [A-Z0-9]. The ^ is a special character in a character
class that means "anything NOT listed here". Therefore [^_] means
"anything that's not an underscore".
Paul Lalli