Dominic Raferd <domi...@timedicer.co.uk> writes: > [1:text/plain Show] > > > [2:text/html Hide Save:noname (6kB)] > > On 11 April 2018 at 01:24, Stephen Satchell <l...@satchell.net> wrote: > > The | operator is supposed to bind to a single token before and after. > > Not true - at least for pcre. Just enclose the entire expression in brackets: > > > /^Subject:\s*(Hello there|Hey man)/ DISCARD > > (However Viktor's suggestion is more flexible/extendable.)
I'll never praise that tool enough, for Perl regex, it saved my bacon more often than not: The Regex Coach (http://weitz.de/regex-coach/) It works fine under wine. In fact, this morning I wrote a regex using the regex coach, so I could see what it did as long as I was writing it. Best s, Olivier --