|
|
| Just another Perl shrine | |
| PerlMonks |
Regex expression to match...by Anonymous Monk |
| on Jun 17, 2011 at 04:35 UTC ( #910068=perlquestion: print w/ replies, xml ) | Need Help?? |
|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
Hello all
I am seeking knowledge for a regular expression to match either of the following: /help/one/one/one/something_here /buy/cash/buy/water/water/water/nothing_here I want to identify the repeating phrase 'one/' or 'water/' I setup a loop that would breakdown each line, and search for repeats, but I am sure there are folks who can identify a repeat using a single expression. Being that I am a beginner, I would be very grateful for some help so I can understand regular expression matching much better. Thank you!
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||