Regex Plugin is a plugin for the 4th Dimension programming language, that allows you to work with regular expressions. Regular expressions are a powerful tool for common string operations such as matching, splitting and replacing text. Patterns are used to describe which characters should match as well as their relative positioning.
Here are some common scenarios where regular expressions can be used:
- Extract email addresses, URL’s, phone numbers or zip codes from a text.
- Turn all email addresses into hyperlinks and optionally obfuscate them so that they can’t be found easily by spammers.
- Split a text in the tab-tab-return format into a two dimensional array.
The plugin contains two sets of commands:
- Preg commands
These commands can be used for many common functions. Using a single function call you can do operations such as finding matches, splitting text or performing find and replace operations on a text. The commands are modelled after their equivalents found in popular programming languages such as PHP en Perl.
- Regex commands
These commands are an alternative to the all-in-one Preg commands. They offer a more interactive approach to working with regular expressions and take things one step at a time. Internally the plugin uses these commands to implement the higher-level Preg commands.
Here is a short list of the available features:
- Compatible with the Perl regular expresion syntax
- Right to left matching mode
- Backward assertions
- Named groups
- Conditional expressions
- Recursive expressions
- Preventing of infinite loops
- Support for Unicode strings
- Support for 4D Server 64-bit on Mac & Windows
- Works with 4D v11,12, 13, 14, 15 and 16.
- Requires Mac OS X 10.6/Windows XP or higher
Licensing & Pricing
Regex Plugin is available free of charge, but comes without technical support.
Version 2.1.2 is now available!
Click on the following links to download Regex Plugin.
Regex Plugin for Mac & Windows