RegExp.this

Construct a RegExp object. Compile pattern with <i>attributes</i> into an internal form for fast execution.

class RegExp
this
(
string pattern
,
string attributes = null
)

Parameters

pattern string

regular expression

attributes string

attributes

Throws

RegExpException if there are any compilation errors.

Examples

Declare two variables and assign to them a RegExp object:

auto r = new RegExp("pattern");
auto s = new RegExp(r"p[1-5]\s*");

Meta