good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^2: How can I reduce this with a REGEX?by misterperl (Pilgrim) |
on Mar 14, 2014 at 17:06 UTC ( [id://1078366]=note: print w/replies, xml ) | Need Help?? |
..appreciate it guys but I'm trying to make this solution simpler & shorter- not longer! This isn't too bad I spose.. Seems to work in a 1-liner: s/(\d\d)((-\d\d)*?)(-\1)/$1$2/g while /(\d\d).*(-\1)/;
In Section
Seekers of Perl Wisdom
|
|