4 Regular Expressions
ksherlock edited this page 2022-11-02 12:29:49 -04:00

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)