2022-05-18
Note:
This is a "quick reference".
The instructions are subjectively reduced to a minimum, to keep focus and clarity.
Special markers:
?
== any char*
== "" "any-chars"a|b
== a || bA match action will skip over ./
or ../
at start of string,
to avoid an unexpected match with .*
in file-path.
A match action is case insensitive.
Special markers:
?
== any char
*
== "" "any-chars"
a|b
== a || b
[abc]
== a || b || c
[]abc[]
== a || b || c || [
|| ]
[!abc]
== ! [abc] <==> [^abc] alias
[!]abc[]
== ! []abc[]
[a!^]
== a || !
|| ^
[a-c]
== a || b || c
Predefined classes:
\\s \\w \\d \\x [:s:] [:w:] [:d:] [:x:]
== space word digit xdigit
\\S \\W \\D \\X [:S:] [:W:] [:D:] [:X:]
== negated class
\\p \\P [:p:] [:P:]
== Safe(r) Path chars, skip these chars:
Ctrl SPC \" # $ % & \' ( ) * / : ; < > ? [ \\ ] { | } \`` DEL
(capture)
== 1 occurrence <==> (1=capture) alias
(1=capture)
== 1 occurrence
(?=capture)
== 0..1 occurrences
(+=capture)
== 1..n occurrences
(*=capture)
== 0..n occurrences
(?-pattern)
== non-capture variant, use -
marker
(!-pattern)
== negated match <==> (^=pattern) alias
(^-pattern)
== negated match
Anchors:
<
== start of word>
== end of word^
== start of haystack/line$
== end of haystack/lineEscape other chars:
\\x
== when x is not in predefined classes and is not an anchor
a case sensitive match for exactly this char is expected.
A match action will skip over ./
or ../
at start of string,
to avoid an unexpected match with .*
in file-path.
A match action is case insensitive.
Note that:
*()*
?()?
(1=?=)
(1=*=)
(1=1=)
!
or ^