Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

RE: The Great Escape

by chromatic (Archbishop)
on Jul 23, 2000 at 08:19 UTC ( #23960=note: print w/ replies, xml ) Need Help??


in reply to The Great Escape

That regex looks a little greedy. How about: s/(.)\[([^]]*?)\]]/linkNodeTitle ($2, $NODE)/egs unless $1 eq '+';
Could be a little faster with the character class in there, too. It's certainly uglier!


Comment on RE: The Great Escape
Download Code
RE: RE: The Great Escape
by ar0n (Priest) on Jul 23, 2000 at 16:45 UTC
    It sure is! :)

    One thing though:
    s/(.)?\[([^]]*?)\]]/linkNodeTitle($2, $NODE)/egs unless $1 eq '+';
    (just the (.)? has changed), so it'll allow node-links at the beginning of the node (i.e. without a character in front of it). Or am I wrong in assuming '.' won't match a null-character? Anyways, I can't remember why I did (.)*?, but in retrospect it's wrong. Thanks.

    -- ar0n | home | mail

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2015-07-04 22:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls