On Fri, Jan 31, 2003 at 10:14:15AM +0000, Mark Fowler wrote: > On Fri, 31 Jan 2003, someone or other wrote about: > > recognising email addresses with a regex > While a real regex, in the mathematical sense, cannot match arbitarly deep > bracing (you need a push down automata for that,) there's nothing regular > about Perl's regex engine. There's no reason you shouldn't be able to > match a valid email with a Perl regex at all, though I freely admit I've > got better (well, more pressing) things to do that try and write one.
OK, I'm missing something, can you post an example that matches arbitrarily deep bracketing in a single perl RE (and only matches if the bracketing is valid, ie. every open has a close and vice versa). I'm not interested in the content, but in the form. I can't see how to do it, and I think i's a useful piece of knowledge for the list. -- Lusercop.net - LARTing Lusers everywhere since 2002