When you were using (.*) it was matching the '|'$string='abchijk'; while ($string =~ s/(\w{2})(\w)/$1\|$2/) { print "$string\n"; }
In reply to Re: regex multiple times
by Cyrnus
in thread regex multiple times
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |