Regular Expressions 101

Save & Share

  • Save Regex
    ctrl+s
  • Update Regex
    ctrl+⇧+s

FlavorNeed help selecting flavor?

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

Function

  • Match
  • Substitution
  • List
  • Unit Tests
Sponsors
An explanation of your regex will be automatically generated as you type.
Detailed match information will be displayed here automatically.

Regular Expression

Regex Versions


No Match

/

Delimiters


/

Regex Flags


Test String

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 Ruby, please visit: http://ruby-doc.org/core-2.2.0/Regexp.html