Re: [jQuery] Any regular expression gurus here?

2007-03-29 Thread Christof Donat
Hi, The regular expression below works on just about everything except nested parentheses: Regular Expressions are used to define regular (Type 3 in Chomsky Hirarchy) grammars. You can not express nested parentheses in regular grammar, you need a context free (Type 2) but not regular

Re: [jQuery] Any regular expression gurus here?

2007-03-29 Thread Karl Swedberg
On Mar 29, 2007, at 4:55 AM, Christof Donat wrote: Regular Expressions are used to define regular (Type 3 in Chomsky Hirarchy) grammars. You can not express nested parentheses in regular grammar, you need a context free (Type 2) but not regular grammar. Christof, that is fascinating!

Re: [jQuery] Any regular expression gurus here?

2007-03-29 Thread Jake McGraw
Christof: This may be true of traditional regular expressions, which is something you'll encounter in a college level automata class but very rarely in the real world. The fact is that most modern, since the 80s at least, regex implementations (JavaScript, Java, PHP,...) can handle many

Re: [jQuery] Any regular expression gurus here?

2007-03-29 Thread Blair Mitchelmore
Also, when perl 6 is released it will have support for a much more powerful system called rules which can handle nested parentheses quite handily. -blair Jake McGraw wrote: Christof: This may be true of traditional regular expressions, which is something you'll encounter in a college level

Re: [jQuery] Any regular expression gurus here?

2007-03-28 Thread Nathan Young -X \(natyoung - Artizen at Cisco\)
Subject: Re: [jQuery] Any regular expression gurus here? For learning how and why regular expressions work and how to use Regular Expressions with grep, Perl, Java, .NET and PHP: Mastering Regular Expressions 3rd Ed. by J. Friedl For learning JavaScript Regex: JavaScript: The Definitive

Re: [jQuery] Any regular expression gurus here?

2007-03-28 Thread Daemach
-Interface Development A: ncy1717 E: [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jake McGraw Sent: Tuesday, March 27, 2007 8:03 AM To: jQuery Discussion Subject: Re: [jQuery] Any regular expression gurus here? For learning how and why

Re: [jQuery] Any regular expression gurus here?

2007-03-28 Thread Howard Jones
Nathan Young -X (natyoung - Artizen at Cisco) wrote: Hey. Check out regex coach. It's a debugging tool that let's you run your expression against sample text and see what's happenning. I can't overstate how much this can help, and I'd recommend it in addition to any help you get from books

Re: [jQuery] Any regular expression gurus here?

2007-03-27 Thread Geoffrey Knutzen
Subject: Re: [jQuery] Any regular expression gurus here? I just went cross-eyed looking at your regex, so I'm sorry I can't help you there (I really need to get a regex book to read), but I know at least in PHP you can create k:v pairs like this: preg_match('/(?Pfoo.*)/', 'bar', $matches); echo

Re: [jQuery] Any regular expression gurus here?

2007-03-27 Thread Jake McGraw
:[EMAIL PROTECTED] On Behalf Of Kenneth Sent: Monday, March 26, 2007 7:25 PM To: jQuery Discussion Subject: Re: [jQuery] Any regular expression gurus here? I just went cross-eyed looking at your regex, so I'm sorry I can't help you there (I really need to get a regex book to read), but I

Re: [jQuery] Any regular expression gurus here?

2007-03-26 Thread Kenneth
I just went cross-eyed looking at your regex, so I'm sorry I can't help you there (I really need to get a regex book to read), but I know at least in PHP you can create k:v pairs like this: preg_match('/(?Pfoo.*)/', 'bar', $matches); echo $matches['foo']; // outputs: bar I'm not sure if that

Re: [jQuery] Any regular expression gurus here?

2007-03-26 Thread Jake McGraw
To quote Mastering Regular Expressions 3rd Ed. by J. Friedl: The real problem is that on the majority of systems, you simply can't match arbitrarily nested constructs with regular expressions. He goes on to give the syntax for matching a SINGLE set of nested parenthesis, it's quite convoluted.

Re: [jQuery] Any regular expression gurus here?

2007-03-26 Thread Daemach
Thanks much. On 3/26/07, Jake McGraw [EMAIL PROTECTED] wrote: To quote Mastering Regular Expressions 3rd Ed. by J. Friedl: The real problem is that on the majority of systems, you simply can't match arbitrarily nested constructs with regular expressions. He goes on to give the syntax for