in reply to Counting characters within regexp
$em =~ /^(\w[\w|\.]).*@(\w\w).*\.(\w+)$/;
Note that in the [\w|\.] character class, the | (pipe) character matches a literal pipe character and is not an alternation. (I'm not sure if you intended a character match or not.) Also, escaping the . (period) character (\.) in the class is not needed, but does no harm.
Give a man a fish: <%-{-{-{-<
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Counting characters within regexp
by Bod (Parson) on May 09, 2021 at 09:26 UTC | |
by hippo (Archbishop) on May 09, 2021 at 11:01 UTC | |
by LanX (Saint) on May 09, 2021 at 09:54 UTC |