Version: v0.7.1 - Beta.  We welcome contributors & feedback.

Regex

Methods for regex strings.

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

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

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

See Also

Methods