regex for matching repeated strings 
Is there a way of writing a regex to find 1 or more occurances of specific 
text string, and replace with a single occurance.

e.g.:


AI000001
AI000001
AI000001
AI000001

needs to be replaced with 

AI0000001

thus (m/(AI\\d{6}\\n)/) will find one occurance and capture as $1 (assuming 
delimiter set to something other than \\n, but how can this regex be modified 
to find multiple occurances and replace with a single occurance?

thanks,
J.


-- 
To unsubscribe, e-mail: beginners-unsubscribe@perl.org
For additional commands, e-mail: beginners-help@perl.org
http://learn.perl.org/


