Module Kwregexp

module Kwregexp: sig .. end

Regular expression-based functions

I generally use Pcre for regular expressions, but it's against my policy to have this library depend on any 3rd-party libraries whose absence might prevent its compilation. I also want to avoid the complexities of conditional compilation.

So, the module is functorized to push the dependency on Pcre into the app that needs this module.

To use it, just do:

module P = Kwregexp.Make (Pcre)

Alternatively, you can use it with OCaml's Str library.

module P = Kwregexp.Make (Str)

Author(s): Keith Waclena

val rex_of_glob : string -> string
rex_of_glob str: convert the traditional Unix glob-pattern (see glob (7)) in str to an equivalent regular expression.

The regexp should work with both Str and Pcre.

module type RegexpType = sig .. end
The signature of the input structure to Make.
module Str: sig .. end
Implementation of RegexpType using Str.
module Make: 
functor (R : RegexpType) -> sig .. end
Functor to be applied to Pcre or Str.