Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Regular Expression problem when Extracting Start\ VALUE \End

by injunjoel (Priest)
on Sep 30, 2005 at 17:15 UTC ( [id://496469]=note: print w/replies, xml ) Need Help??


in reply to Regular Expression problem when Extracting Start\ VALUE \End

Greetings all,
In the spirit of TIMTOWTDI my suggestion is to use \Q\E.
sub getInfoFromSingleLineMultiLineFile { #args and file opening... while($line = <IFH>){ if($line =~ /\Q$stag\E(.*?)\Q$etag\E/){ push(@wanted_substrings,$1); } } return @wanted_substrings; }
That should get you what you want.

-InjunJoel
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forego their use." -Galileo

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-04-25 23:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found