Re: 4.0a3 - Two Regular Expression Libraries? -- We need your input!
- Posted by Tom Mar 17, 2009
- 1226 views
This could be an opportunity to create a Euphoria friendly regex library.
include std/regex.e as re regex r = re:new( "\\\\" ) object result = re:find( r, "Eup\\horia" ) ? result -- { -- {4,4} -- }
This example shows how messy a regular expression can getsearching for just one character. The problem is that \ is an escape character in both the regex and the string you are searching. If you provide a regex-library that uses, say ~ , as an escape character then a regex should become much easier to read.
For those that like Perl, then a wrapped Perl library could be obtained from the archive.
Tom