-
Notifications
You must be signed in to change notification settings - Fork 6
Regular Expressions
ksherlock edited this page Nov 2, 2022
·
4 revisions
Evaluate and If commands.
expression =~ /regex/ equivalent to regex
expression !~ /regex/ not equivalent to regex
| MPW | Standard | Comments |
|---|---|---|
| ? | . | Match any character (except return) |
| ≈ | .* | Match 0 or more characters |
| ∂ | \ | Escape special character |
| • | ^ | Match beginning of line (editor search only) |
| ∞ | $ | Match end of line (editor search only) |
| [...] | [...] | Sets. Case-insensitive unless {CaseSensitive} variable is set to 1. ∂ / \ ' " [ ] require ∂ escaping. - must be first to be a literal character. |
| [¬...] | [^...] | Set negation |
| + | + | Repeat 1 or more times |
| * | * | Repeat 0 or more times |
| «n» | {n} | Repeat n times (also «n,n», «,n», «n,») |
| (...)®n | Capture the expression in variable @n (where n is 0-9) | |
| ®n | Match previously captured variable. (editor search/replace only) |