Module Re_pcre
include Re.Pcre
type regexp
= Re__.Core.re
type flag
=[
|
`CASELESS
|
`MULTILINE
|
`ANCHORED
]
type groups
= Re__.Core.groups
type split_result
=
Result of a
Pcre
.full_split
val re : ?flags:flag list -> string -> Re__.Core.t
re ~flags s
creates the regexps
using the pcre syntax.
val regexp : ?flags:flag list -> string -> regexp
re ~flags s
compiles the regexps
using the pcre syntax.
val extract : rex:regexp -> string -> string array
extract ~rex s
executesrex
ons
and returns the matching groups.
val get_substring : groups -> int -> string
Equivalent to
Core
.Group.get.
val get_substring_ofs : groups -> int -> int * int
Equivalent to
Core
.Group.offset.
val pmatch : rex:regexp -> string -> bool
Equivalent to
Core
.execp.
val substitute : rex:Re__.Core.re -> subst:(string -> string) -> string -> string
val full_split : ?max:int -> rex:regexp -> string -> split_result list
val split : rex:regexp -> string -> string list
val quote : string -> string
Deprecated
type substrings
= Re__.Core.groups