Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Think about Loose Coupling
 
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 avoiding work at the Monastery: (7)
As of 2014-04-19 03:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (475 votes), past polls