more useful options | |
PerlMonks |
Re: How do I find the Nth occurrence of a pattern?by vroom (His Eminence) |
on Jan 18, 2000 at 23:44 UTC ( [id://2151]=note: print w/replies, xml ) | Need Help?? |
Use the /g (global) to find all occurrences in a string. Place the matching statement within a while loop and count until you get to the wanted number.
In Section
Seekers of Perl Wisdom
|
|