From 15e7dd511bdda7b437950c9b3905c97abbecdfdb Mon Sep 17 00:00:00 2001 From: VENKATA SAI HEMANTH GADIPARTHI <2400030034@kluniversity.in> Date: Mon, 1 Dec 2025 17:11:18 +0530 Subject: [PATCH] regex: add page (#19617) Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --- pages/common/regex.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pages/common/regex.md 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}}]`