RegExp.opCall

Generate instance of RegExp.

class RegExp
static
opCall
(
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 = RegExp("pattern");
auto s = RegExp(r"p[1-5]\s*");

Meta