Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Matching in huge files

by Anonymous Monk
on Oct 06, 2004 at 18:06 UTC ( #397117=note: print w/replies, xml ) Need Help??


in reply to Matching in huge files

This is very usefull for me, but, how can this be changed to correctly handle potential matches that overlap? Thanks very much

Replies are listed 'Best First'.
Re^2: Matching in huge files
by dws (Chancellor) on Oct 13, 2004 at 23:38 UTC

    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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://397117]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2018-07-18 14:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (393 votes). Check out past polls.

    Notices?