in reply to RegEx to find the index of the character '@' in an Email address
Regular expressions are not strings, so don't use $mail =~ "...";. Maybe you want to just use index instead of a regular expression?
If you really want to use a regular expression, don't use strings, use regular expressions:
... if( $mail =~ /\@/ ) { ... } ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: RegEx to find the index of the character '@' in an Email address
by JavaFan (Canon) on Jul 26, 2010 at 16:02 UTC | |
by Corion (Patriarch) on Jul 26, 2010 at 16:05 UTC |