The ("","ab","cd",) is the "" before the first match, the "ab" of This actually is a slightly return format. One can also pass two strings to "regex-posix-unittest" to run your own ~/.cabal/bin/regex-posix-unittest "abcd" "()+" "TestRegexLazy -at- mightyreason -dot- com". Please either add it and your summary results or email the results to If your platform is not mentioned in this wiki page (see below) then You can add and delete but please do not change existing tests. Subexpressions that do not match are lists as "(?,?)" instead of with numbers.The first pair is the whole match, further pairs are for parenthesized subexpression captures.Each pair of numbers denotes a substring of the text to search as two 0-based indexes.NOMATCH if the matching should fail # "(n,m)(.)" if the match succeeds.The text to search (no white-space) # The expected result.The regular expression pattern (extended regular expression).The test identification Int, negative if this is expected to fail.This is followed aĮach unit test line has four fields, separated by white-space (one tab Which is shipped listing all the test files. Passing or failing of each test in each file listed in "test-manifest.txt", Running the regex-posix-unittest program produces output for the A set of ".txt" files containing one unit test per line.The "test-manifest.txt" file which lists files to load test from.The "regex-posix-unittest" binary executable.This package can be installed either as "-user" or
Testable on your system by way of the regex-posix-unittest package on These problems are documented here, but examples of the bugs are Since then additional bugs have been found and fixed, so regex-tdfa is now on at least version 0.97.4, and a future regex-posix-unittest may include the additional test cases. Note that all of these tests are passed by regex-tdfa-0.97.1 (but not below Testregex.c available from Glenn Fowler, the rest from the author of regex-tdfa ( ChrisKuklewicz).
if "p" in "p*" is used to capture non-empty text then additional repetitions of "p" will not capture an empty stringĪll of the above rules will be violated by one or another bug described below.if "p" and "q" can never match the same text then "p|q" and "q|p" are equivalent, up to trivial renumbering of captured subexpressions.text of component subexpressions must be contained in the text of the higher-level subexpressions.parenthesized subexpressions return the match from their last usage.REs have right associative concatenation which can be changed with parenthesis.higher-level subpatterns have leftmost-longest priority over their component subpatterns.earlier subpatterns have leftmost-longest priority over later subpatterns.regular expressions (REs) take the leftmost starting match, and the longest match starting there.Used by Linux distributions and the BSD C library used by OS X andįreeBSD and NetBSD (XBSD). This is especially true for the GNU C library (GLIBC) Support that contains bugs and/or violates the Unfortunately the native platforms provide Posix regular expressions Note that the matchAll semantics changed in regex-posix with version , either the older 0.72.* version or the newer version (> 0.94.*). Have been imported via FFI and wrapped by Through a wrapping of the operating system's native C library.
The regular expressions provided by the GHC bundle (up to 6.10.1) are You should use the regex-tdfa package instead.
HASKELL FREE LIBRARY PORTABLE