Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Rep Exp multiple matches
February 19, 2011, 1:10 pm
rate this thread
$string = 'abc3abc2xyz4abc5def6abc1';
Note that the string could be of any length.
I want to print all the digits which follow 'abc'. Like:
I don't see how to handle the multiple occurrences using a regular
expression. I imagine I need some form of loop, such as WHILE, but
cannot see how to construct this.
Can anyone give me a few pointers?
- » FAQ 7.2 What are all these $@%&* punctuation signs, and how do I know when to use them?
- — Previous thread in » PERL Discussions