RE: Regex expressions for EXU
- Posted by Andy Serpa <renegade at earthling.net> May 04, 2002
- 360 views
I re-wrote much of David's version for my own use before I got the PCRE library working to add some functionality. My code is a bit of mess so I never gave it to anyone, but I should point out that the version in the archives has a number of bugs, and also can't be used as a real replacement for proper regular expressions because it can't handle patterns like: Beginning.*End or any pattern that uses a wildcard that is supposed to be followed by something specific -- it always matches the wildcard to the end of the subject. My version takes care of that, but the result is about 100X slower than the PCRE library, so I just abandoned it once I started using that. I think a completely different approach needs to be taken to do a make a real Euphoria regex engine, but I fear it would still be quite slow. I believe there are two main strategies (types of engines), but I don't know what the algorithms really are... Euler German wrote: > On 4 May 2002, at 17:43, Kat wrote: > > > > > Didn't David write one last year? > > > > Kat > > > > A quick search at The Archive, returned: > RegEx Matcher (David '98) http://members.aol.com/EnjoyCruz/regexpr.zip. > Pattern Matching (Karl '02), a wrapper for PCRE.DLL (Win) that can be > retrieved from http://www.rapideuphoria.com/regex.zip. > > -- Euler > >