regex

fnauto regex(S : C[], C)(const S[] patterns, const(char)[] flags = "") if (isSomeString!(S)) @trusted

Compile regular expression pattern for the later execution.

Returns

Regex object that works on inputs having

the same character width as pattern.

Parameters

patternA single regular expression to match.
patternsAn array of regular expression strings. The resulting Regex object will match any expression; use whichPattern to know which.
flagsThe _attributes (g, i, m, s and x accepted)

Throws

RegexException if there were any errors during compilation.
fnauto regex(S)(S pattern, const(char)[] flags = "") if (isSomeString!(S)) @trusted

ditto