RegexEditor.dev Logo

Regex Editor & Tester

Build, test, and debug regular expressions

a|εOptionality via ε: a|εAlternationFormal RE✨ Emoji Combos

The formal way to express "a is optional". Programming regex writes a?; formal RE writes (a|ε). This is the theoretical definition of the ? quantifier.

✓ Accepts
εa
✗ Rejects
baaab
Loading editor…