← Resources RESOURCE
Even the same regex differs slightly in syntax and support from language to language.

The core concepts of regex are shared, but the finer syntax (the flavor) differs by language. This tool uses the browser's JavaScript (ECMAScript) engine, so when you move a pattern to another environment you should be aware of the differences.

Named groups are supported in JavaScript, Python, and PCRE alike, but the syntax differs. JavaScript and PCRE use (?<name>...), while Python uses (?P<name>...), and references differ too. Lookbehind is supported in modern JavaScript, Python, and PCRE, but is absent in some older environments.

Flag notation also differs. JavaScript attaches them after a slash, like /pattern/gi, while Python passes constants like re.IGNORECASE as arguments. JavaScript's s (dotAll) and u (unicode) flags may be default behavior or have different names in other languages.

Unicode properties \p{...} require the u flag to work in JavaScript, while PCRE and Python (the regex module) handle them a bit differently. When moving a pattern to another language, check these items first in that language's regex documentation.