With the /e modifier you can simplify your program a bit:
#!/usr/str/perl use strict; use warnings; my $toTranslate = "333333333333333333333333333333333333333333333333333333333333333333333 +333333333333333333333333333333333333333333333333233333333322333333333 +233333333333333333333333333333333323333333322333333332333333333"; 1 while $toTranslate =~ s/((?:3{4})+)/"[" . length($1) . "]"/ge; print $toTranslate,"\n";
In reply to Re: Regex exact pattern match problem!
by moritz
in thread Regex exact pattern match problem!
by Jts
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |