in reply to Multi-line regex
Something like that.open FOO, "somewhere" or die "cannot open somewhere: $!"; $_ = join "", <FOO>; if (/ (?:^|\n) # Start matching either at the start of the string # or at a newline. The ?: part means, that # the parentheses I use don't get saved in $1 \.(\w+).+\n # match a line starting with a dot-word and some # more stuff \t+\.\w+ # The line after this must start with at least one # tab and then a dot-word \W+(\w+) # and contain some other stuff as well ... /mx ) { ... you found one ... }
-- Randal L. Schwartz, Perl hacker
|
|---|