Karteikarten
Regex basics
Karten in diesem Stapel (34)
- 1^Start of string or line
- 2$End of string or line
- 3\AStart of input (ignores 'm' flag)
- 4\ZEnd of input (ignores 'm' flag)
- 5\GEnd of the previous match
- 6\bWord boundary (any position proceeded or followed - but not both - by a letter, digit or underscore)
- 7\BNon-word boundary
- 8\nNew line
- 9\rCarriage return
- 10\tTab
- 11\vVertical tab
- 12\fForm feed
- 13*Zero or more
- 14+One or more
- 15?Zero or One (i.e. optional)
- 16{n}Exactly 'n' (any number)
- 17{n,}Minimum ('n' or more)
- 18{n,m}Range ('n' or more, but less or equal to 'm')
- 19\wWord
[a-zA-Z0-9_] - 20\WNon-word
[^a-zA-Z0-9_] - 21\dDigit
[0-9] - 22\DNon-digit
- 23\sWhitespace (Form-feed, tab, vertical-tab, new line, carriage return and space)
[\f\t\x0b\n\r ] - 24\SNon-whitespace
- 25\xHexadecimal digit
\x00=null; \x0d=\r; [\x61-\x7a]=[a-z] - 26\OOctal digit
- 27.Any character (except new line \n)
- 28(...)Capture group - captures a set of characters for a later expression
- 29(?:...)Non-capture group - groups an expression but does not capture. e.g. /((?:foo|fu)bar)/ matches "foobar" or "fubar" without "foo" or "fu" appearing as a captured subpattern
- 30(?=...)Lookahead - match on the characters following. e.g. /ab(?=c)/ match "ab" only when followed by "c"
- 31(?!...)Negative lookahead - match on characters that aren't following. e.g. /ab(?!c)/ match "ab" only when NOT followed by "c"
- 32(?<=...)Positive look-behind assertion. e.g. /(?<=foo)bar/ matches "bar" when preceded by "foo"
- 33(?<!...)Negative look-behind assertion. e.g. /(?
- 34(?#...)Comment e.g. (?# This comment is ignored entirely)
Informationen
- Beschreibung
- computer science general Karteikarten am Regex basics, erstellt von Mircea Chira am 03/10/2017.
- Erstellt von
- Mircea Chira · Okt 2017
- Aktualisiert
- 3 Okt 2017
- Aufrufe
- 1
- Bewertung