Please enable JavaScript.
Coggle requires JavaScript to display documents.
Regex (Character Classes (Negated ("q[^u]" means:
"q…
Regex
Character Classes
Negated
"q[^u]" means:
"q followed by a char that is not u",
rather than "q not followed by u"
'^' is a literal when it's not right after '[', e.g. [x^]
-
-
Dot
Dot '.' matches any character,
except line break characters
Under Perl "single-line mode", dot also matches line breaks
-
-
Internals
Regex-directed engines
-
-
A regex-directed engine walks through the regex, attempting to match the next token in the regex to the next character. If a match is found, the engine advances through the regex and the subject string. If a token fails to match, the engine backtracks to a previous position in the regex and the subject string where it can try a different path through the regex.text
Text-directed engine
A text-directed engine walks through the subject string, attempting all permutations of the regex before advancing to the next character in the string. A text-directed engine never backtracks.text
-
-
-
-
-