diff --git a/pages/common/regex.md b/pages/common/regex.md new file mode 100644 index 0000000000..be4734e876 --- /dev/null +++ b/pages/common/regex.md @@ -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: . + +- 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}}]`