Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Regex help/ Lua parse

by grizzley (Chaplain)
on Oct 26, 2012 at 07:47 UTC ( #1001018=note: print w/ replies, xml ) Need Help??


in reply to Regex help/ Lua parse

You could save yourself one match by replacing

if ($line =~ m/^\s*terminal\s=\s"([^"]+)"\s*$/) { $line =~ s/$1/$change/; }
with
$line =~ s/^(\s*terminal\s=\s")([^"]+)("\s*)$/$1$change$3/;


Comment on Re: Regex help/ Lua parse
Select or Download Code
Re^2: Regex help/ Lua parse
by marquezc329 (Scribe) on Oct 26, 2012 at 20:53 UTC
    Thank you. Modified all occurrences like this.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2014-10-25 08:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (142 votes), past polls