Pattern.match

Undocumented in source. Be warned that the author may not have intended to support it.
struct Pattern
@safe pure inout
inout(Result)
match
(
string input
,
bool insensitive = false
)

Examples

auto p = Pattern("a|bc|one|two three");
assert(p.match("a")         == Result(true, "a"));
assert(p.match("one")       == Result(true, "one"));
assert(p.match("two three") == Result(true, "two three"));
assert(p.match("cb")        == Result(false, null));

Meta