Regular expression question.

John Woods john at frog.UUCP
Thu Mar 2 11:43:00 AEST 1989


In article <364 at sunny.UUCP>, poage at sunny.UUCP (Tom Poage) writes:
> Is there a reason why I don't find regular expressions
> with both alternation and explicit number of occurrence
> declaration?  Here's what I mean ...
> In some public-domain regexp routines I can use
> 	(string1|string2)
> In other routines I can use
> 	(something){3,4}
> However, I have never seen routines with the ability to use 
> these two constructs together, such as
> 	(x|y|(z){4,5})
> 
If no one else admits to one, I once modified Henry Spencer's regexp package
(which has the first feature) to include the second feature (like System V).
I should probably clean it up and test it more before handing it out (Henry's
code was of excellent quality, and I wouldn't want to embarass myself :-),
but it is available (though perhaps I should send it to him and let him
worry about it (as if he isn't busy enough already, what with being months
behind summarizing Aviation Leak :-)).



-- 
John Woods, Charles River Data Systems, Framingham MA, (508) 626-1101
...!decvax!frog!john, john at frog.UUCP, ...!mit-eddie!jfw, jfw at eddie.mit.edu

"He should be put in stocks in Lafeyette Square across from the White House
 and pelted with dead cats."	- George F. Will



More information about the Comp.unix.questions mailing list