Using Dotstar · Part 7
Flavors and converting
Regular expressions differ between languages: in syntax, in flags, in what \w means. The menu at the start of the row above the pattern chooses the flavor, whose engine runs the pattern, and with it the syntax, the flags and the replacement’s syntax. Each is the real engine, built into Dotstar: PCRE2 as in PHP, Python’s re, .NET’s Regex, Java’s java.util.regex, Go’s regexp, and in Pro many more. JavaScript runs in the engine of the system or browser Dotstar runs in, named in the menu.
Switching, and converting
Switching flavor offers the pattern converted to the new one, in a bar under the pattern:

- Convert takes the converted pattern; Keep as is leaves the pattern as written.
- The notes say what doesn’t carry over (in red) and what behaves differently (in grey): a named group spelled another way, a
\wthat knows more letters in the new engine. - Dotstar then looks for a short text the two engines find differently in, and shows it; Add to the text puts it there, to see the difference for yourself.
It converts from the flavor the pattern was written for, so after Keep as is, the next switch still starts from there. Settings → Flavors can make switching convert at once, or never offer it.
Converting between flavors is in Dotstar Pro.
Which flavor?
The one your code runs in. A pattern tried in JavaScript and pasted into Python may still work, or may not quite, as the lessons show in their boxes on other flavors; tried in Python’s own engine, it does what Python will do. When you don’t know which engine will run it, or want it to work in several, Compare runs it in all of them.
Dialects
Some flavors have a dialect menu beside them: POSIX’s basic and extended (BRE and ERE), C++’s six grammars, and Pomsky’s target engine. Pomsky is a language of its own, written to be read, compiled into a regex for the engine you choose.