
22 Aug
2004
22 Aug
'04
6:39 p.m.
On Sun, 22 Aug 2004 17:37:36 +0100, John Clements <johnjc-regex@publicinfo.net> wrote:
^\s*An appeal.+?(Joined )?Cases? ?t ?[-] ?\d{1,3}\/ ?\d{2}(.+?between|.*)
Yes, putting the ".+?" inside the parenthesis does the trick. And the "|.*" makes perfect sense. It says so directly "or the rest of the string".
What I forgot to say: Note that the order is important. This regex ^\s*An appeal.+?(Joined )?Cases? ?t ?[-] ?\d{1,3}\/ ?\d{2}(.*|.+?between) won't work because the engine will try the "rest of the string" first and will succeed, so it will stop. Cheers, Edi.