Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re^2: Matching in huge files

by dws (Chancellor)
on Oct 13, 2004 at 23:38 UTC ( #399055=note: print w/replies, xml ) Need Help??

in reply to Re: Matching in huge files
in thread Matching in huge files

how can this be changed to correctly handle potential matches that overlap?

How would you handle overlapping matches in a smaller string? The easiest approach is to apply each pattern to the string in serial. The slightly more complicated fix is to "back up" (via pos()) the length of the match - 1, then proceed with matching all in parallel. Either approach would work here. It comes down to your specific requirements.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2020-10-28 03:21 GMT
Find Nodes?
    Voting Booth?
    My favourite web site is:

    Results (259 votes). Check out past polls.