Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Re: Capturing with look-ahead

by dragonchild (Archbishop)
on Mar 04, 2002 at 19:34 UTC ( [id://149188]=note: print w/replies, xml ) Need Help??


in reply to Re: Capturing with look-ahead
in thread Capturing with look-ahead

Your choice. *shrugs* I was asking a general question whose answer I plan on using in a number of other applications. There are many situations where one would want to parse something using a regex as groups of N characters, advancing M characters at a time. It just so happens that this is the first reason I've wanted to.

------
We are the carpenters and bricklayers of the Information Age.

Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

Replies are listed 'Best First'.
Re: Re: Re: Capturing with look-ahead
by mdillon (Priest) on Mar 04, 2002 at 22:50 UTC

    "Who me?"

    Your timing is pretty lame. You should have known you'd be spoiling the golf tournament for some people. And contrary to your assertion, I do not think that capturing groups of characters with a regex while only advancing partially is actually something you'd want to do in general. Using substr would be more efficient, as metadoktor's reply wisely noted. This is primarily useful for shortening your golf, so don't act all innocent.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (4)
As of 2024-03-28 17:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found