The /s modifier allows '.' to match newlines. However, if you're reading one line at a time, you're never giving the regexp an opportunity to deal with more than one line at a time. You're only reading "thisquery=select\\n" on the first iteration, for example. How can you expect the regexp to look ahead to lines you haven't read yet?
Not knowing precisely how your input file is layed out, I'll just offer a tip in speculation. If your records are separated by more than one '\n' (newline), you might set your input record separator to '\n\n' and see what happens. ;)
You can do that by putting a BEGIN{ $/ = qq/\n\n/; } at the beginning of your script, right before the s/select(.*?....... There's also a command line switch to alter the input record separator, but I always have to look it up in perlrun because I'm forgetful... leading me to just use the BEGIN{...} block trick.
Hope this helps...
Dave
In reply to Re: Problem with a multi-line regexp
by davido
in thread Problem with a multi-line regexp
by nr0mx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |