mirror of
https://github.com/tldr-pages/tldr.git
synced 2026-08-30 17:33:50 +08:00
regex: add page (#19617)
Co-authored-by: Managor <42655600+Managor@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
021ed3fac5
commit
15e7dd511b
@@ -0,0 +1,33 @@
|
||||
# regex
|
||||
|
||||
> Regular expressions (`regex`) are patterns used to match, search, and manipulate text.
|
||||
> Not a direct command, but syntax to be used with other commands.
|
||||
> More information: <https://cheatography.com/davechild/cheat-sheets/regular-expressions/>.
|
||||
|
||||
- Match any single character:
|
||||
|
||||
`.`
|
||||
|
||||
- Match the start of a line:
|
||||
|
||||
`^{{hello}}`
|
||||
|
||||
- Match the end of a line:
|
||||
|
||||
`{{world}}$`
|
||||
|
||||
- Match zero or more repeated characters:
|
||||
|
||||
`{{a}}*`
|
||||
|
||||
- Match a set of characters:
|
||||
|
||||
`[{{abc}}]`
|
||||
|
||||
- Match a range of characters:
|
||||
|
||||
`[{{a-z3-9}}]`
|
||||
|
||||
- Match anything but the specified character:
|
||||
|
||||
`[^{{a}}]`
|
||||
Reference in New Issue
Block a user