Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: regex & variable substitution

by neniro (Priest)
on Jul 11, 2005 at 09:29 UTC ( [id://473878]=note: print w/replies, xml ) Need Help??


in reply to regex & variable substitution

s/&([^;]+);?/"&#".exists $lookup{$1} ? $lookup{$1} : $1.";"/e; should work the way you want it?!

Replies are listed 'Best First'.
Re^2: regex & variable substitution
by kiz (Monk) on Jul 11, 2005 at 09:37 UTC
    Hmmm... I'm sure I tried this too... definitely better that I was getting, but still not right: I get the value inserted if the key exists, but the match is not left in place if there is no key in the hash. Also, I'm not getting the bracketing text.. Still, I'm further that I was! :-)


    -- Ian Stuart
    A man depriving some poor village, somewhere, of a first-class idiot.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2024-04-25 07:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found