SheetWindow
0
0
379
600
PyRex Regex Sheet
:/icons/icons/icon.ico:/icons/icons/icon.ico
background-color: rgb(225, 225, 225);
0
-
border:No;
true
0
0
344
1465
-
-
Arial
9
75
true
min-height:15;
max-height:15;
background-color: rgba(0, 0, 0, 0%);
Regular Expression Basics
-
background-color:rgb(255, 85, 0);
border:No;
height:1px
Qt::Horizontal
-
-
min-width:100px;
max-width:100px;
.
-
Any character except newline
-
-
min-width:100px;
max-width:100px;
a
-
The character a
-
-
min-width:100px;
max-width:100px;
ab
-
The string ab
-
-
min-width:100px;
max-width:100px;
a|b
-
a or b
-
-
min-width:100px;
max-width:100px;
a*
-
0 or more a's
-
-
min-width:100px;
max-width:100px;
\
-
Escapes a special character
-
-
Arial
9
75
true
min-height:15;
max-height:15;
background-color: rgba(0, 0, 0, 0%);
Regular Expression Quantifiers
-
background-color:rgb(255, 85, 0);
border:No;
height:1px
Qt::Horizontal
-
-
min-width:100px;
max-width:100px;
*
-
0 or more
-
-
min-width:100px;
max-width:100px;
+
-
1 or more
-
-
min-width:100px;
max-width:100px;
?
-
0 or 1
-
-
min-width:100px;
max-width:100px;
{2}
-
Exactly 2
-
-
min-width:100px;
max-width:100px;
{2, 5}
-
Between 2 and 5
-
-
min-width:100px;
max-width:100px;
{2,}
-
2 or more
-
-
min-width:100px;
max-width:100px;
{,5}
-
Up to 5
-
-
min-width:100px;
max-width:100px;
ab
-
The string ab
-
-
Arial
9
75
true
min-height:15;
max-height:15;
background-color: rgba(0, 0, 0, 0%);
Regular Expression Groups
-
background-color:rgb(255, 85, 0);
border:No;
height:1px
Qt::Horizontal
-
-
min-width:100px;
max-width:100px;
(...)
-
Capturing group
-
-
min-width:100px;
max-width:100px;
(?P<Y>...)
-
Capturing group named Y
-
-
min-width:100px;
max-width:100px;
(?:...)
-
Non-capturing group
-
-
min-width:100px;
max-width:100px;
\Y
-
Match the Y'th captured group
-
-
min-width:100px;
max-width:100px;
(?P=Y)
-
Match the named group Y
-
-
min-width:100px;
max-width:100px;
(?#...)
-
Comment
-
-
min-width:100px;
max-width:100px;
{2}
-
Exactly 2
-
-
Arial
9
75
true
min-height:15;
max-height:15;
background-color: rgba(0, 0, 0, 0%);
Regular Expression Character Classes
-
background-color:rgb(255, 85, 0);
border:No;
height:1px
Qt::Horizontal
-
-
min-width:100px;
max-width:100px;
[ab-d]
-
One character of: a, b, c, d
-
-
min-width:100px;
max-width:100px;
[^ab-d]
-
One character except: a, b, c, d
-
-
min-width:100px;
max-width:100px;
[b]
-
Backspace character
-
-
min-width:100px;
max-width:100px;
\d
-
One digit
-
-
min-width:100px;
max-width:100px;
\D
-
One non-digit
-
-
min-width:100px;
max-width:100px;
\s
-
One whitespace
-
-
min-width:100px;
max-width:100px;
\S
-
One non-whitespace
-
-
min-width:100px;
max-width:100px;
\w
-
One word character
-
-
min-width:100px;
max-width:100px;
\W
-
One non-word character
-
-
Arial
9
75
true
min-height:15;
max-height:15;
background-color: rgba(0, 0, 0, 0%);
Regular Expression Assertions
-
background-color:rgb(255, 85, 0);
border:No;
height:1px
Qt::Horizontal
-
-
min-width:100px;
max-width:100px;
^
-
Start of string
-
-
min-width:100px;
max-width:100px;
\A
-
Start of string, ignores m flag
-
-
min-width:100px;
max-width:100px;
$
-
End of string
-
-
min-width:100px;
max-width:100px;
\Z
-
End of string, ignores m flag
-
-
min-width:100px;
max-width:100px;
\b
-
Word boundary
-
-
min-width:100px;
max-width:100px;
\B
-
Non-word boundary
-
-
min-width:100px;
max-width:100px;
(?=...)
-
Positive lookahead
-
-
min-width:100px;
max-width:100px;
(?!...)
-
Negative lookahead
-
-
min-width:100px;
max-width:100px;
(?<=...)
-
Positive lookbehind
-
-
min-width:100px;
max-width:100px;
(?<!...)
-
Negative lookbehind
-
-
min-width:100px;
max-width:100px;
(?()|)
-
Conditional
-
-
min-width:100px;
max-width:100px;
\Z
-
End of string, ignores m flag
-
-
Arial
9
75
true
min-height:15;
max-height:15;
background-color: rgba(0, 0, 0, 0%);
Regular Expression Flags
-
background-color:rgb(255, 85, 0);
border:No;
height:1px
Qt::Horizontal
-
-
min-width:100px;
max-width:100px;
i
-
Ignore case
-
-
min-width:100px;
max-width:100px;
m
-
^ and $ match start and end of line
-
-
min-width:100px;
max-width:100px;
s
-
Matches newline as well
-
-
min-width:100px;
max-width:100px;
x
-
Allow spaces and comments
-
-
min-width:100px;
max-width:100px;
L
-
Locale character classes
-
-
min-width:100px;
max-width:100px;
u
-
Unicode character classes
-
-
min-width:100px;
max-width:100px;
(?iLmsux)
-
Set flags within regex
-
-
Arial
9
75
true
min-height:15;
max-height:15;
background-color: rgba(0, 0, 0, 0%);
Regular Expression Flags
-
background-color:rgb(255, 85, 0);
border:No;
height:1px
Qt::Horizontal
-
-
min-width:100px;
max-width:100px;
\n
-
Newline
-
-
min-width:100px;
max-width:100px;
\r
-
Carriage return
-
-
min-width:100px;
max-width:100px;
\t
-
Tab
-
-
min-width:100px;
max-width:100px;
\YYY
-
Octal character YYY
-
-
min-width:100px;
max-width:100px;
\xYY
-
Hexadecimal character YY
-
-
Arial
9
75
true
min-height:15;
max-height:15;
background-color: rgba(0, 0, 0, 0%);
Regular Expression Replacement
-
background-color:rgb(255, 85, 0);
border:No;
height:1px
Qt::Horizontal
-
-
min-width:100px;
max-width:100px;
\g<0>
-
Insert entire match
-
-
min-width:100px;
max-width:100px;
\g<Y>
-
Insert match Y (name or number)
-
-
min-width:100px;
max-width:100px;
\Y
-
Insert group numbered Y