Regular Expression
ALPHANUM | |
---|---|
A..Z, a..z, 0..9 | match themself |
DOT | |
---|---|
. | match any char |
REPEAT | must appear after some element to be repeated |
---|---|
? | 0 or 1 char ( equal to {0, 1} ) |
+ | 1 or more chars ( equal to {1, } ) |
* | 0 or more chars ( equal to {0, } ) |
{n,} | n or more chars |
{,m} | 0 or more chars, up to m |
{n,m} | n or more chars, up to m |
{n} | exactly n chars |
ASSERTIONS | |
---|---|
^ | Matches the starting position within the string. |
$ | Matches the ending position of the string or the position just before a end of line |
SUB-EXPRESSIONS | |
---|---|
(exp) | exp is subexpression |
SEQUENCES | |
---|---|
[seq] | seq is matching sequence |
[^seq] | seq is non-mathcing sequence |
[ [.SYM.] ] | collating SYM |
Examples
Text | RegEx | Result |
---|---|---|
gfksafdh W0123456 sdsfsdfsaf | W[0-9]+ | W0123456 |
gfksafdh W0123456 sdsfsdfsaf | W[012345]+ | W012345 |
gfksafdh W0123456 sdsfsdfsaf | .[0,1,2,3,4,5,6]+ | W0123456 |
gfksafdh W0123456 sdsfsdfsaf | [A-Z,0-9]* | W0123456 |
MeaJNN: 71C61 ZooTemt | [0-9][A-z]* | 71C61 |
Comentar #1 / 20.02.2021 - 16:00 / from: John Doe | [0-9,\:]{5} | 16:00 |
Email from AJ to service@stepover.de was send yesterday | [A-z,0-9]+@[A-z, 0-9]+\.[A-z]+ | service@stepover.de |
1 2 21.2.2021 33 44.A | [0-9]{1,2}\.[0-9]{1,2}\.[0-9]{2,4}. | 21.2.2021 |
2021-01-12 13:52:56 W090001, 01.01...V9... 10x10_FHA100_DT 3,0_Bol 0,5 / MU Per Fraction 52.5 Beam I-000 re Beam I-000 re | [0-9]+\.[0-9] (Leerzeichen am Ende!) | 52.5 |
urn:cid:199606121851.1@bar.example.com | @[^\.]+\. | @bar. |