Regular Expression Calculator - How to Use

Build your regular expression. Buttons add meta characters / wild cards to your expression. Match or replace text in the source and see the results.

Source Text to be Changed Result
^ Line Start $ Line End \n New Line \r Carriage Return
. Match Any Character [abc] Either a,b or c [^abc] Not a,b or c (ab|cd) ab or cd
\d Any Digit \w Any Letter, Digit or _ \s Any White Space \b Word Ending
\D Not a Digit \W Not a Letter, Digit or _ \S Not a White Space \B Not Word End
\t Tab \v Vertical Tab \f Form Feed \\ Single Back Slash
* Zero or More + One or More ? Zero or One (?=d) After Match
{3} Exactly 3 Matches {3,5} 3 to 5 Matches {3,} At least 3 Matches (?!d) Not After Match
$& Matched Text $1 Bracket 1 $` Text Before Match $' Text After Match