POSIX is a collection of standards that define some of the functionality that a (UNIX) operating system should support. One of these standards defines two flavors of regular expressions. Commands involving regular expressions, such as grep, egrep, sed, awk, etc. implement these flavors on POSIX-compliant UNIX systems. Several database systems like MySQL and Oracle also use POSIX regular expressions.
The Basic Regular Expression flavor standardizes one of the oldest regex flavors. This flavor is peculiar compared with modern flavors because it requires most metacharacters to be escaped with a backslash to give it its special meaning rather than to take away that meaning. Converting between BRE and other flavors can thus be confusing. Fortunately, RegexBuddy can take care of all that.
The Extended Regular Expression flavor uses the same syntax as modern regex flavors. While it is “extended” compared with the BRE flavor, it is actually rather limited compared with modern regular expression libraries and programming languages.
RegexBuddy ships with source code templates for PHP (ereg), MySQL and Oracle that use the ERE flavor. You can also create your own templates for other tools and languages that follow one of the POSIX regex standards.
First, use RegexBuddy to define a regex or retrieve a regexp saved in a RegexBuddy library. Rely on RegexBuddy’s clear regex analysis, which is constantly updated as you build the pattern, rather than dealing with the cryptic regex syntax on your own. Detailed help on that syntax is always only a click away.
If you copied a regex written for another flavor of regular expressions, simply paste it into RegexBuddy, select the original flavor, and then convert the regex to POSIX BRE or ERE.
If you created a new regular expression, test and debug it in RegexBuddy before using it in your source code. Test each regex in RegexBuddy’s safe sandbox without risking precious data. Quickly apply the regex to a wide variety of input and sample data, without having to produce that input through your script.
Finally, let RegexBuddy generate a source code snippet that you can copy and paste directly into whichever tool or code editor you use. Just choose what you want to use the regex for, and a fully functional code snippet is ready. You can change the names of variables and parameters to suit your naming style or the current situation, which RegexBuddy automatically remembers.