mirror of
https://github.com/m-lamonaca/dev-notes.git
synced 2025-04-08 11:56:41 +00:00
Fix line endings
This commit is contained in:
parent
17bf5fe2de
commit
ba32234ba9
1 changed files with 8 additions and 8 deletions
|
@ -19,7 +19,7 @@
|
||||||
`+` one or more repetitions
|
`+` one or more repetitions
|
||||||
`*` zero or more repetitions
|
`*` zero or more repetitions
|
||||||
`?` zero or one repetition
|
`?` zero or one repetition
|
||||||
`{m}` exactly *m* times
|
`{m}` exactly *m* times
|
||||||
`{m, n}` at least *m* times, at most *n* times
|
`{m, n}` at least *m* times, at most *n* times
|
||||||
|
|
||||||
The `*`, `x`, and `?` qualifiers are all greedy; they match as much text as possible
|
The `*`, `x`, and `?` qualifiers are all greedy; they match as much text as possible
|
||||||
|
@ -27,7 +27,7 @@ Adding `?` *after* the qualifier makes it perform the match in non-greedy or min
|
||||||
|
|
||||||
## Special Characters
|
## Special Characters
|
||||||
|
|
||||||
`\a, \b, \f, \n, \r, \t, \u, \U, \v, \x, \\, \?, \*, \+ , \., \^, \$` special characters
|
`\a, \b, \f, \n, \r, \t, \u, \U, \v, \x, \\, \?, \*, \+ , \., \^, \$` special characters
|
||||||
`\(`, `\)`, `\[`, `\]` brackets escaping
|
`\(`, `\)`, `\[`, `\]` brackets escaping
|
||||||
|
|
||||||
## Delimiters
|
## Delimiters
|
||||||
|
@ -42,24 +42,24 @@ Adding `?` *after* the qualifier makes it perform the match in non-greedy or min
|
||||||
`[__]{m , n}` consecutive characters in the class (`[aeiou]{2}` --> ae, ao, ...)
|
`[__]{m , n}` consecutive characters in the class (`[aeiou]{2}` --> ae, ao, ...)
|
||||||
`[a-z]` sequence of lowercase characters
|
`[a-z]` sequence of lowercase characters
|
||||||
`[A-Z]` sequence of uppercase characters
|
`[A-Z]` sequence of uppercase characters
|
||||||
`[a-zA-Z]` sequence of lowercase or uppercase characters
|
`[a-zA-Z]` sequence of lowercase or uppercase characters
|
||||||
`[a-z][A-Z]` sequence of lowercase characters followed by sequence of uppercase charaters
|
`[a-z][A-Z]` sequence of lowercase characters followed by sequence of uppercase charaters
|
||||||
`[^__]` anything but the elements of the class (include `\n` to avoid matching line endings)
|
`[^__]` anything but the elements of the class (include `\n` to avoid matching line endings)
|
||||||
|
|
||||||
`^`, `\`, `-` and `]` must be escaped to be used in clases: `[ \]\[\^\- ]`
|
`^`, `\`, `-` and `]` must be escaped to be used in clases: `[ \]\[\^\- ]`
|
||||||
|
|
||||||
## Groups
|
## Groups
|
||||||
|
|
||||||
`(__)` REGEX subgroup
|
`(__)` REGEX subgroup
|
||||||
`(REGEX_1 | REGEX_2)` match in multiple regex (R1 OR R2)
|
`(REGEX_1 | REGEX_2)` match in multiple regex (R1 OR R2)
|
||||||
`(?=__)` match only if `__` is next substring
|
`(?=__)` match only if `__` is next substring
|
||||||
`(?!__)` match only if `__` is not next substring
|
`(?!__)` match only if `__` is not next substring
|
||||||
`(?<=__)` match only if `__` is previous substring
|
`(?<=__)` match only if `__` is previous substring
|
||||||
`(?<!__)` match only if `__` is not previous substring
|
`(?<!__)` match only if `__` is not previous substring
|
||||||
|
|
||||||
`\<number>` refers to n-th group
|
`\<number>` refers to n-th group
|
||||||
|
|
||||||
## Special Cases
|
## Special Cases
|
||||||
|
|
||||||
`(.*)` match anything
|
`(.*)` match anything
|
||||||
`(.*?)` match anything, non-greedy match
|
`(.*?)` match anything, non-greedy match
|
||||||
|
|
Loading…
Add table
Reference in a new issue