RegexpConvertor
abstract class RegexpConvertor
Properties
static protected | $unicodePropsRegexp | Regexp that matches Unicode properties escape sequences |
|
static protected | $unicodeProps | Ranges to be used in JavaScript regexps in place of PCRE's Unicode properties |
Methods
Convert a PCRE regexp to a JavaScript regexp
Replace Unicode characters and properties in a string
Escape line terminators in given regexp
No description
No description
No description
No description
No description
No description
No description
No description
No description
No description
Replace Unicode properties in a string
Details
at line 30
static string
toJS(string $regexp, bool $isGlobal = false)
Convert a PCRE regexp to a JavaScript regexp
at line 87
static protected string
convertUnicodeCharacters(string $str, bool $inCharacterClass, bool $dotAll)
Replace Unicode characters and properties in a string
NOTE: does not support \X
at line 104
static protected string
escapeLineTerminators(string $regexp)
Escape line terminators in given regexp
at line 129
static protected string
serializeOption(array $tok)
No description
at line 139
static protected string
serializeCapturingSubpatternStart(array $tok)
No description
at line 144
static protected string
serializeNonCapturingSubpatternStart(array $tok)
No description
at line 154
static protected string
serializeCapturingSubpatternEnd(array $tok)
No description
at line 159
static protected string
serializeNonCapturingSubpatternEnd(array $tok)
No description
at line 164
static protected string
serializeCharacterClass(array $tok)
No description
at line 169
static protected string
serializeLookaheadAssertionStart(array $tok)
No description
at line 174
static protected string
serializeNegativeLookaheadAssertionStart(array $tok)
No description
at line 179
static protected string
serializeLookaheadAssertionEnd(array $tok)
No description
at line 184
static protected string
serializeNegativeLookaheadAssertionEnd(array $tok)
No description
at line 201
static protected string
unfoldUnicodeProperties(string $str, bool $inCharacterClass, bool $dotAll)
Replace Unicode properties in a string
NOTE: does not support \X