Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Matching a regular expression group multiple times

by sundialsvc4 (Abbot)
on Aug 12, 2014 at 23:42 UTC ( #1097198=note: print w/ replies, xml ) Need Help??


in reply to Matching a regular expression group multiple times

As far as I know, there are (just) two issues at-bar here:

  1. If you want to match zero-or-more adjacent occurrences of a single string, in any particular place within the source, then you must use a quantifier such as + ... and the search should be “greedy.”
  2. If you need to match multiple times within the same string, the modifiers /gc should be used, within a loop that will then search through and exhaust the input string.

And, that’s it.

  • Comment on Re: Matching a regular expression group multiple times

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1097198]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2016-06-27 04:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (335 votes). Check out past polls.