RegexpParser
abstract class RegexpParser
Methods
Generate a regexp that matches any single character allowed in a regexp
Return the name of each capture in given regexp
No description
Details
at line 26
static string
getAllowedCharacterRegexp(string $regexp)
Generate a regexp that matches any single character allowed in a regexp
This method will generate a regexp that can be used to determine whether a given character could in theory be allowed in a string that matches the source regexp. For example, the source regexp /^a+$/D would generate /a/ while /^foo\d+$/D would generate /[fo\d]/ whereas the regexp /foo/ would generate // because it's not anchored so any characters could be found before or after the literal "foo".
at line 192
static string[]
getCaptureNames(string $regexp)
Return the name of each capture in given regexp
Will return an empty string for unnamed captures
at line 211
static array
parse(string $regexp)
No description