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 (1)
Sponsors
An explanation of your regex will be automatically generated as you type.

Regular Expression

Regex Versions


r"

Delimiters


"
gm

Regex Flags


Unit Tests

"id": "P01", "description": "starting with # and then digits and hyphen and then digits and one or more space", "regex": "^#([\\d]+[-]+[\\d]+)\\s+([a-zA-Z0-9\\s*]+)$", "inputField": "preProcessedMerchantName", "outputField": "cleanMerchantName", "isCaseSensitiveMatch": "false", "trimOutput": "true", "transformation": "T5"

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 SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html