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 (4)

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 int a =6 ; assert that regex does match
given the string char b,d, t; assert that regex does match
given the string final String var_name = 3; assert that regex does match
given the string int a, b=3, c,d; assert that regex does 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 PHP, please visit: http://php.net/manual/en/ref.pcre.php