libregexp-pp-ocaml-dev | Syntax extension for OCaml to make Regexp usage much easier | Mehr ...
Regexp/OCaml provides convenient syntax sugar for regular expression match for strings using PCRE/OCaml library. The features of this macro package are the following: . * Convenient syntax: similar to standard match-with expression . * Binding matching substrings to variables: no more $1, $2, ... . * Automagical easy-to-use type-coercion: no flood of int_of_string etc. . * Support for optional-patterns: gives string option type etc. . * Default values for optional-patterns . A regular expression which appears in the source file will be evaluated only once; it is pre-compiled before actual execution and then cached. The package contains a small macro, called "once", makes any value to be evaluated only once.