Regular Expressions 101

Save & Share

  • Save Regex
    ctrl+s
  • Go to library entry

FlavorNeed help selecting flavor?

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests (8)
Sponsors
An explanation of your regex will be automatically generated as you type.

Regular Expression

Regex Versions


/

Delimiters


/
gm

Regex Flags


Unit Tests

given the string roberto.lopez@example.com assert that regex does match
given the string roberto@example.es assert that regex does match
given the string roberto.lopez@example.co.uk assert that regex does match
given the string 1@example.com assert that regex does match
given the string 1@2 assert that regex does not match
given the string Fasdfasdfasdf82 assert that regex does not match
given the string Adrase@asdf assert that regex does not match
given the string @example.com assert that regex does not match

Tools and Filters



Code Generator

Generated Code

Loading code sample...

Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for JavaScript, please visit: https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions