Skip to main content

Convert a regex

Regex Converter translates patterns, flags, delimiters, and replacements between regex flavors. It lists changes and known differences so you can review the result before using it.

Free
Convert any flavor to JavaScript
Pro
All target flavors and engine comparison
Self-hosted
Optional add-on
Compare plans

Open the converter​

  1. Select the source flavor.
  2. Enter a pattern.
  3. Open Regex Converter from the tools menu.
  4. Select a flavor to inspect its converted pattern and findings.
  5. Select Load … into editor to use that result and close the dialog.

In Substitution or Extraction mode, the converter also translates the replacement text. You can convert incomplete patterns and patterns with errors. The converter applies available changes and reports unresolved problems. You can load a result even when it has errors, then correct it in the editor.

Free and Pro​

Free converts any supported source flavor to JavaScript. The JavaScript row opens first. You can also select the Source row to inspect your original pattern. Select a locked flavor to view the Pro upgrade options.

Pro converts to every supported target flavor and runs your enabled test strings across engines. The table shows match counts, replacement counts, and execution times. Select a row to inspect its results.

Free does not run test strings inside the converter. You can load the JavaScript result and test it in the main editor. On self-hosted Enterprise, the entire converter requires its license add-on. There is no free preview.

Choose a conversion mode​

Use Prioritize at the bottom of the dialog:

  • Shorter pattern keeps compact syntax and warns about known matching differences. This is the default.
  • Closer matching uses more equivalent rewrites, which can make patterns longer.

Both modes are available for free. Your choice is saved and also appears under Regex conversion mode in settings.

Check the result​

Compatible needs no conversion. Converted contains changes. Approximate has known differences. Incompatible means the converter did not produce a usable result for that flavor.

Review the errors, warnings, and changes for the selected row. Conversion is best effort. Matching behavior can differ between engines. With Pro, compare results on representative test strings before using the converted pattern.