Regexp.fromString

Stephen Weeks MLton@sourcelight.com
Fri, 15 Mar 2002 11:32:58 -0800


I went with

         fun upper (r, n: int) =
	    if n = 0
	       then null
	    else or [null, seq [r, upper (r, n - 1)]]


> No reason; just seemed pointless to support "^" and not "$".  Also, there
> are rules in the regexp man pages about ensuring that "^" and "$" occur
> only at the beginning or end of top-level regexps, and I didn't feel like
> threading enough state to ensure that they were obeyed. 

I also added anchorFinish and implemented ^ and $.  The code ignores
uses that aren't at the beginning or end (respectively).  Hopefully
that's good enough.