[e-lang] Poll: Adding regular expression objects to the standard library
kpreid at switchb.org
Mon May 30 22:12:54 PDT 2011
E currently has the rx`` quasi-parser for pattern matching, as Bob knows.
However, unlike typical regular expression facilities, rx`` always performs an *anchored* match, because it is used as part of E's destructuring patterns.
This results in messy notation when one wants to actually perform a search, and most likely, more inefficient use of the underlying regular expression engine.
I propose that rx`...` occurring as a *value*, rather than a pattern, should yield a regular expression object, which will provide an interface to perform the traditional search, split, and other operations familiar from other languages.
1. Does this seem like a good idea overall? Any comments?
Kevin Reid <http://switchb.org/kpreid/>
More information about the e-lang