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

Re: Regex help/ Lua parse

by grizzley (Chaplain)
on Oct 26, 2012 at 07:47 UTC ( [id://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/;

Replies are listed 'Best First'.
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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1001018]
help
Chatterbox?
and the web crawler heard nothing...

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

    No recent polls found