Back to dashboard

Developer Tools

Regex, text diff, case conversion, encoding, local QR codes, SemVer and line processing.

RegexDiffQRSemVer

Local tools. Inputs and files never leave your browser. Regex and diff jobs stop after 2 seconds.

Regex

Result

Replacement preview

Regex reference

JavaScript regular expression syntax. Click an example to load it into the tester.

Examples

Character classes
TokenMeaningExample
.Any character except line breaks (with s: including)a.c → abc, a-c
\d / \DDigit 0–9 / not a digit\d+ → 42
\w / \WWord character [A-Za-z0-9_] / other\w+ → user_1
\s / \SWhitespace (space, tab, newline) / othera\sb → a b
[abc]One of the listed charactersgr[ae]y → grey
[^abc]Any character except those listed[^0-9]+ → abc
[a-z]Character range[A-F0-9]{2} → 3E
\p{L}Any Unicode letter (requires flag u)\p{L}+ → Grüße
Anchors & escaping
TokenMeaningExample
^Start of input (with m: start of line)^Hallo
$End of input (with m: end of line)\.txt$
\b / \BWord boundary / no word boundary\bcat\b → cat, nicht cats
\. \* \\Escape special characters to match them literally1\.5 → 1.5
\n \tLine break / taba\nb
Quantifiers
TokenMeaningExample
*0 or moreab* → a, abbb
+1 or moreab+ → ab, abbb
?0 or 1 (optional)colou?r → color
{n} {n,} {n,m}Exactly n / at least n / n to m\d{2,4} → 2026
*? +? ??Lazy: as few as possible<.+?> → <b>
Groups & lookarounds
TokenMeaningExample
(abc)Capturing group, available as $1(\d+)px
(?<name>…)Named group, available as $<name>(?<jahr>\d{4})
(?:…)Group without capturing(?:ab)+ → abab
a|bAlternative: a or bjpe?g|png
\1Backreference to group 1(\w)\1 → ll
(?=…) / (?!…)Followed by / not followed by\d+(?=€)
(?<=…) / (?<!…)Preceded by / not preceded by(?<=\$)\d+
Flags
TokenMeaningExample
gGlobal: find all matches, not just the firstgi
iIgnore caseabc ≙ ABC
mMultiline: ^ and $ match per linegm
sDot also matches line breaksgs
uUnicode mode, enables \p{…}gu
ySticky: match only at lastIndexy
Replacement
TokenMeaningExample
$1 $2Content of group 1, 2 …$2.$1
$<name>Content of a named group$<jahr>
$&The entire match[$&]
$` / $'Text before / after the match$`
$$A literal dollar sign$$5