Hi,
Yeah you're right about that. I confess to removing the non-capturing annotation for simplicity sake. Here's a slightly different version where the \d* isn't redundant:
my @t = qw( regex regex. regex.1 regex.12 regex.1a regex.a regex.abc r +egex.a1 oregex.2 ); say s/^regex(?!\.[^\d])(\.\d*)?/|$&|/r for (@t);
|regex| |regex.| |regex.1| |regex.12| |regex.1|a regex.a regex.abc regex.a1 oregex.2
In reply to Re^3: Regex \. help
by Loops
in thread Regex \. help
by codz67
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |