perl -e "$s='OOO....MMMM..IIIII';$s=~s/(.)(\.+)/$1.$1 x length($2)/eg; +print $s,$/;" # OOOOOOOMMMMMMIIIII
Or more appropriately for here:
perl -e "$s='JJ..A....PPPP..HHHH...';$s=~s/(.)(\.+)/$1.$1 x length($2) +/eg;print $s,$/;" # JJJJAAAAAPPPPPPHHHHHHH
In reply to Re: How to make these reg exp changes?
by keszler
in thread How to make these reg exp changes?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |