
sergiu1103
New User
Oct 24, 2013, 6:52 AM
Post #1 of 5
(19344 views)
|
Multiple newlines problem with regexp
|
Can't Post
|
|
Hi, could anybody give me a hint regarding a problem I'm facing with a regexp? I am trying to search for the string: "Options None" that may be found within the following text, inside apache's httpd.conf: <Directory /> ... some text ... Options None ... other text ... </Directory> I am using $pattern =~ m/\n<Directory \/>.*Options None.*<\/Directory>\n/is but the search is greedy and is not stopping at the first </Directory>, but rather at the last one in the file. [^<]\/Directory> also did not do the trick. I think because it's stopping the search before it reaches my text sequence. Thanks
(This post was edited by sergiu1103 on Oct 24, 2013, 6:53 AM)
|