Le 13/11/2014 19:08, J. a écrit :
> Why does this text match the pcre? As I read it, there must be a line
> break after the underscores to match, but it's matching. Does . match
> linebreaks?:
>
> Text:
> "For Testing Only: __________________________ xxxxxxx
>
> From: My Name <g...@test.com>
> To: any one <any....@whatever.com> "
>
> PCRE rule:
> /____________________*[\s\n\r]*(.*) (.*)@test.com/      REJECT testing
>

[\s\n\r]* means 0 or more occurence of \s \n or \r, Your regexp will
match anything (including empty string) followed by @test.com, so here the
From: My Name <g...@test.com>

But I think multiline regexp are more tricky than that, somebody with
more knowledge than me might infirm or confirm this.

Reply via email to