Regex101 URLs With Pre-Filled Values

It’s possible to link to regex101 with pre-filled regular expression, flags, and test string, as well as pre-selected flavor/engine with these undocumented URL parameters:

code snippet start


https://regex101.com/?regex=...&testString=...&flags=...&flavor=...

code snippet end

Example link

The flavor value can be one of the following:

  • pcre2 for PCRE2 (PHP >=7.3)
  • pcre for PCRE (PHP <7.3)
  • javascript for ECMAScript (JavaScript)
  • python for Python
  • golang for Golang
  • java for Java 8
  • dotnet for .NET 7.0 (C#)
  • rust for Rust

While regex101 has a nice feature for saving and sharing, these parameters are convenient for programmatically creating playground links.