View source code Display the source code in std/regex.d from which this page was generated on github. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

Struct std.regex.RegexMatch

A regex engine state, as returned by match family of functions.

Effectively it's a forward range of Captures!R, produced by lazily searching for matches in a given input.

alias Engine specifies an engine type to use during matching, and is automatically deduced in a call to match/bmatch.

Properties

Name Type Description
captures [get] Same as .front, provided for compatibility with original std.regex.
empty [get] bool Test if this match object is empty.
front [get] Functionality for processing subsequent matches of global regexes via range interface:
hit [get] R Shorthands for front.pre, front.post, front.hit.
post [get] R Shorthands for front.pre, front.post, front.hit.
pre [get] R Shorthands for front.pre, front.post, front.hit.

Methods

Name Description
popFront Functionality for processing subsequent matches of global regexes via range interface:
save Functionality for processing subsequent matches of global regexes via range interface:

Templates

Name Description
opCast Same as !(x.empty), provided for its convenience in conditional statements.

Authors

Dmitry Olshansky,

API and utility constructs are modeled after the original std.regex by Walter Bright and Andrei Alexandrescu.

License

Boost License 1.0.

Comments