Extended regex wanted

Y.NEYER nyb at lzaz.UUCP
Thu Dec 12 01:35:10 AEST 1985



Does anyone know of extended format pattern matching routine
(preferably in C).By extended I mean the following:
 () [] . * + ^ $ retain their current meaning (cf. ed).
 RE := re as in regex
 RE3 := RE1 & RE1		str will match RE3 iff it matches RE1 and RE2
 RE3 := RE1 | RE1		str will match RE3 iff it matches RE1 or RE2
 RE3 := (RE1)
 RE3 := RE1RE2			i.e. can put things together in arbitrary order.
 
for example (^[0-9][1-3]|a)(blue|red|yellow)+flower$
should match a string beginning with 'a' or a number between 01 and 93
followed by 1 or more occurrences of words 'blue','yellow',or 'red',terminating
with the word `flower'.

In other words something a little more powerful then egrep.(And if the
pattern can be compiled all the better.)
If somebody has seen (or has) the code for the beast,
please respond to inhp4!lzma!nyb

						Thanx in advance,
						Gene Neyer.



More information about the Comp.unix mailing list