Regular Expressions 101

Save & Share

  • Fork Regex
    ctrl+s
  • Go to community entry

FlavorNeed help selecting flavor?

  • PCRE2 (PHP >=7.3)
  • PCRE (PHP <7.3)
  • ECMAScript (JavaScript)
  • Python
  • Golang
  • Java 8
  • .NET (C#)
  • Rust

Function

  • Match
  • Substitution
  • List
  • Unit Tests (11)

Tools

Sponsors
An explanation of your regex will be automatically generated as you type.

Regular Expression

Regex Versions


/

Delimiters


/

Regex Flags


Unit Tests

given the string θσερ@εχαμπλε.ψομ assert that regex does match
given the string юзер@екзампл.ком assert that regex does match
given the string राम@मोहन.ईन्फो assert that regex does match
given the string 伊昭傑@郵件.商務 assert that regex does match
given the string "Joe.\\Blow"@example.com assert that regex does match
given the string "Fred Bloggs"@example.com assert that regex does match
given the string "Abc@def"@example.com assert that regex does match
given the string !#$%&'*+-/=?^_`.{|}~@example.com assert that regex does match
given the string Abc.123@example.com assert that regex does match
given the string user+mailbox/department=shipping@example… assert that regex does match
given the string Abc@example.com assert that regex does match

Tools and Filters