It REALLY helps me to verbally walk through a regex.
Your original one (m/$\w+\_/) says something like:
"match the end of the line ($) followed by one or more
word characters followed by ??? Not sure, because the
"_" doesn't need to be escaped. If you want to match
*any* string with the last character of "_", you could
do something like:
/.*_$/ which says "zero or more characters followed by
a literal "_" followed by the end of the line.
Remember that this regex will suck anything in with a
trailing "_"...so maybe /^\w+_$/, which says "the
beginning of a line, followed by one or more word
charaters, followed by a "_", followed by the end of
the line.
Hope this helps: remember to talk your way through
them step by step...it really helps!
~Matt C.
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/