Regular Expressions (Regex)
Homepage / Notes / Computer Science / Regex
Basics
| Symbol | Description |
|---|---|
| . | replaces any character |
| ^ | matches start of string |
| $ | matches end of string |
| * | matches up zero or more times the preceding character |
| \ | Represent special characters |
| () | Groups regular expressions |
| ? | Matches up exactly one character |
Examples
"Do you like cats?" =~ /like/7