help on split

H

Hai Xu

Hi,

I ahve a string
string="ThisAAaAAteAAAAst"
now, I want to split it using "AA" as separator, say
@str = split(/AA/, $string);
however, I want to leave any AA+ as it is, that is,
AAAA and any part of AAAA are not considered as
separator.

Any one knows how to use string pattern match to
do it ?
Of course, I can do it my own way, but I'd like to see
if it's possible in pattern matching.

Thanks

Hai
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top