Re: RegExp to match against RegExp's

"Joel C. Salomon" <JoelCSalomon@Gmail.com>
3 Mar 2007 23:33:35 -0500

          From comp.compilers

Related articles
RegExp to match against RegExp's alex.habar.nam@gmail.com (whiskey) (2007-03-01)
Re: RegExp to match against RegExp's JoelCSalomon@Gmail.com (Joel C. Salomon) (2007-03-03)
Re: RegExp to match against RegExp's rsc@swtch.com (Russ Cox) (2007-03-05)
Re: RegExp to match against RegExp's dickey@saltmine.radix.net (Thomas Dickey) (2007-03-08)
Re: RegExp to match against RegExp's alex.habar.nam@gmail.com (whiskey) (2007-03-14)
| List of all articles for this month |

From: "Joel C. Salomon" <JoelCSalomon@Gmail.com>
Newsgroups: comp.compilers
Date: 3 Mar 2007 23:33:35 -0500
Organization: Aioe.org NNTP Server
References: 07-03-003
Keywords: lex, parse, comment
Posted-Date: 03 Mar 2007 23:33:35 EST

whiskey wrote:
> how would a regular expression that matches a regular
> expression look like ?


Which flavor of regexp? But that hardly matters; since parenthesis and
brackets must be matched in a valid regexp, regular expressions cannot
themselves be described by a regular language.


On Plan 9 systems, almost all regexp-using programs use the regexp
library. Its syntax is given in
http://plan9.bell-labs.com/magic/man2html/6/regexp, in BNF. (A Unix
port is available at http://swtch.com/plan9port/unix/). POSIX regular
expressions are probably defined somewhere, I just don't know where.


--Joel
[POSIX REs are defined where you'd expect, in the POSIX standard. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.