[project @ 2001-08-02 11:20:50 by simonmar]
authorsimonmar <unknown>
Thu, 2 Aug 2001 11:20:50 +0000 (11:20 +0000)
committersimonmar <unknown>
Thu, 2 Aug 2001 11:20:50 +0000 (11:20 +0000)
commit1e93f575b6111cf00d2cd9d9a19f905002d1d4c8
tree7702786aea9edce87e18a2ea7e62e8d8e70f464b
parentfdd40d3e92a0ae5ef18407fc1d4bd12c377d608d
[project @ 2001-08-02 11:20:50 by simonmar]
Add a POSIX regular expression binding as Text/Regex/Posix.  POSIX
regexps are provided virtually everywhere (except Windows, but there's
always pcre), and this means we won't have to ship the a copy of
GNU regex.c, which is GPL'ed.

Compared to hslibs/text/Regex.lhs, this one is much shorter (150 lines
vs. 350), more portable (uses the FFI libs and hsc2hs vs. casm), and
easier to use (it returns the right number of subexpressions from the
regex, rather than 32 all the time).

Text.Regex is a re-implementation of the old
hslibs/text/RegexString.lhs, written to use Text.Regex.Posix.  The
syntax of regexps is probably not identical, but it's certainly
similar enough that the URI library works unchanged with the new
implementation.
Text/Regex.hs [new file with mode: 0644]
Text/Regex/Posix.hsc [new file with mode: 0644]