Version: v0.6.0 - Beta.  We welcome contributors & feedback.  THanks!

Regex

Methods for regex strings.

Note: Backslashes \ in regex strings do not need to be escaped.

// Regex literal string
$pattern = r'\d+ \w+';

// Creating a Regex from a dynamic string
$word = '(\\w+)';
$pattern = new Regex($word, 'i');

See Also

Methods