module Glob: sig end
0-9
is the same as 0123456789
.
For anything more complicated, you'll need full regular
expressions. I like PCRE, myself.
type
t
val compile : ?cs:bool -> string -> t
cs
: True if the pattern is case-senstive, false for a case-insensitive pattern. Defaults to case-sensitive.val exec : t -> string -> bool
val quick : ?cs:bool -> string -> string -> bool
quick pattern against
does a one-shot matchcs
: True if the pattern is case-senstive, false for a case-insensitive pattern. Defaults to case-sensitive.val case_sensitive : t -> bool
val escape : string -> string
typere_style =
[ `PCRE | `Str ]
Glob.regexp_of_glob
val regexp_of_glob : ?style:re_style -> ?glob:t -> ?pat:string -> unit -> string
Invalid_arg
if glob and pat are both missing.style
: The type of regular expression syntax to support. The default is 'PCRE
.glob
: A compiled wildcard pattern to use. Either this or pat must be given.pat
: A string wildcard pattern to use. Either this or glob must be given.