in reply to Req expression translation

It looks like there are some errors in that re. The caret "^" anchors the match to the beginning of the string. The characters inside the square brackets are a character class, which in this case should match any word character "\w", a dot, or a hyphen. However, when used this way, the hyphen should be first in the class. I believe the dot must be escaped even inside a chracter class, but I am not certain. The "+" following the character class means "match this character one or more times". The remaining characters would match a trailing "@myinfo.com", but the dot must be escaped for it to work.

update - The "@" must also be escaped, lest perl interpret it as a variable.

Replies are listed 'Best First'.
Re: Re: Req expression translation
by Anonymous Monk on Dec 12, 2003 at 13:14 UTC
    Thanks!!