Try it out: ;)
I'm sticking to my answer (well, if i had COPIED IT CORRECTLY!!! bad jeffa!) , remember that the 's' modifier allows . to match that newline. Your suggestion would be pretty much the same (and i will admit possibly a bit safer) except you NEED 'm' and ^ in case ARCSERVE.NLM appears in the middle or end of a line.use strict; my $arc = 'ARCSERVE.NLM'; my $slurped = do {local $/; <DATA>}; #my ($temp) = $slurped =~ /^($arc.*)\n\n/sm; my ($temp) = $slurped =~ /($arc.*?\n)\n\n/s; print $temp; __DATA__ not this one or this one asdffARCSERVE.NLM or even this one ---------------- ARCSERVE.NLM sign here and here and here and here and here ---------------- but not here blah blah blah blah blah blah
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to (jeffa) 3Re: Searching for variable then blank lines
by jeffa
in thread Searching for variable then blank lines
by rscott212
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |