Last update:   22-10-2021

Character class

Match any one of serveral characters. Find g, r, followed either an e or a, followed by y.
! Outside a class literal characters have an implied AND-THEN between them. Inside inside a class the implication is OR ! Within a character class metacharacter "-" (dash) indicates a range of characters. Multiple ranges are fine: [0-9A-F]
You can freely combine ranges with literal characters: [0-9a-z_!.?] Note that a dash is a metacharacter only within a character class. Otherwise it matches the normal dash character. Tasks    (2/2)


Regex to find gray or gray but not greay

The text is gray or grey but not greay
Regex to find gray, grey or gre-ay

The text is gray, grey or gre-ay

Negated classes

        A B C D E F