The good news about regular expressions is that you can use them with a wide variety of applications and programming languages. The bad news is that the developers of each regular expression engine (the software component that executes your regular expressions) has their own idea of what the regex syntax should be. That has resulted in a wide range of regular expression flavors. Though many claim to the "Perl compatible", there are significant differences between most flavors.
Fortunately, RegexMagic takes these differences into account when generating your regular expressions. RegexMagic supports 15 different regular expression flavors. Together, these cover all the programming languages popular today, as well as the regex engines that are powering the regex features in most applications you use. All you need to do is to select the proper flavor in RegexMagic, and RegexMagic generates a regular expression that works perfectly with your programming language or application. Better yet: if you select your programming language on the Use panel, RegexMagic automatically selects the correct regex flavor.
- JGsoft: This flavor is used by the Just Great Software products, including PowerGREP, EditPad Pro, and AceText.
- .NET: This flavor is used by programming languages based on the Microsoft .NET framework. It is generally also the regex flavor used by applications developed in these programming languages. RegexMagic generates regular expressions that work with all versions of the .NET framework.
- Java: The regex flavor of the java.util.regex package, available in the Java 4 (JDK 1.4.x) and later. A few features were added in Java 5 (JDK 1.5.x) and Java 6 (JDK 1.6.x), but regexes generated by RegexMagic do not depend on those new features. This flavor is generally also the regex flavor used by applications developed in Java.
- Perl: The regex flavor used in the Perl programming language. Regular expressions generated by RegexMagic work with Perl 5.6 and later.
- PCRE: The open source PCRE library, which is used in a variety of applications and programming languages, including PHP. Regular expressions generated by RegexMagic work with PCRE 5.0 and later.
- Python: The regex flavor supported by Python's built-in re module. Regular expressions generated by RegexMagic work with Python 2.4 and later.
- Ruby: The regex flavor built into version 1.8 of the Ruby programming language. Ruby 1.9 has a new regex flavor that is compatible with Ruby 1.8. RegexMagic thus supports both Ruby 1.8 and 1.9.
- Tcl ARE: The regex flavor developed by Henry Spencer for the regexp command in Tcl 8.2 and 8.4, dubbed Advanced Regular Expressions.
- POSIX BRE: Basic Regular Expressions as defined in the IEEE POSIX standard 1003.2.
- POSIX ERE: Extended Regular Expressions as defined in the IEEE POSIX standard 1003.2.
- GNU BRE: GNU Basic Regular Expressions, which are POSIX BRE with GNU extensions, used in the GNU implementations of classic UNIX tools.
- GNU ERE: GNU Extended Regular Expressions, which are POSIX ERE with GNU extensions, used in the GNU implementations of classic UNIX tools.
- XML: The regular expression flavor defined in the XML Schema standard.
- XPath: The regular expression flavor defined in the XQuery 1.0 and XPath 2.0 Functions and Operators standard.
|Generating a regular expression for Java|
|Implementing a regular expression in C#|