http://tech.groups.yahoo.com/group/power-pro/message/31611
Many thanks to Alan Campbell.
Non-current regex files have been moved to a new "Regex (Prior)" folder in the plugins section of the files area.
PowerPro plugin regex Version 2.04
Release Highlights
-Introduced optional tagged parameters
-Fixed issues with pcreMatchCount and short name versions of the POSIX functions
-Added a new miscellaneous service, regex.GetDefaultOptions
-Enhanced regex.SetDefaultOptions to allow it to read a custom option string from a key in the regex ini file
-Deactivated the previously implemented but problematic pattern callout feature. The callout argument of various pcreServices currently has no effect
-Enhanced regexPluginTest script
-Enhanced regexDialog scriptInstallation Instructions
Remove old versions of pcre*.dll from your PowerPro directory (or the folder where your pcf file is store, if different) and old regex.dll from your plugins or PowerPro directory. Unzip regex0204.zip into your PowerPro directory, preserving folder structure. All files should go into appropriate locations.
Note: you will need a copy of the dll plugin (dll.dll) version 0097 and the dialog plugin version 0074 to use the included regexDialog script. The included regexDialog script has an useful update since the one recently posted with the dialog plugin 0074. There are plans to include this version with the dialog plugin in the future.
There is another optional help file available, pcre.chm. If installed it should go into the same directory as regex.chm (i.e., your plugins folder).
The pcre library in this distribution is version 7.2.
Refer to regex.chm for additional information.
Regards,
Sheri
http://tech.groups.yahoo.com/group/power-pro/messages/31313?threaded=1&m=e&var=1&tidx=1
Why new regex functions?
The Posix functions of the original Regex plugin have served the PowerPro community well for years. Within their expressed limitations, they work well for identifying matches and executing replacements.
But they do have limitations:
- No options, default settings are constants
- No error diagnostics to assist in troubleshooting complex patterns under development
- Lookbehind assertions are not supported in global functions; using them may lead to unexpected results
- Empty match anomalies
- Though linked to PCRE (library for Perl Compatible Regular Expressions) they support "posix" rather than "perl compatible" regular expressions
- No support for many features available in PCRE
The original regex functions still work in this updated plugin, and the original documentation is included in this help file. PowerPro itself depends on the original functions for caption matching and other features. (see the PowerPro manual).
The new regex functions are designed to leverage newer capabilities of PCRE and PowerPro
- Provides pattern error diagnostics
- Provides numerous options
- Fully supports for lookbehind assertions
- Provides personalized default options and custom option combinations
- Facilitates creation of handles to compiled regular expressions; the handles can be used in chained operations
- Creates optional vectors filled with matches, substrings and/or offsets
- Allows the default settings built into the PCRE library to be identified
- Provides sophisticated format string processing for match listings and replacements
- format/replace string recognizes named subpatterns
- format/replace string facilitates changes the text case of referenced matches and substrings
- Provides callback facilities for custom matching and replacing
Regex Version 2.03 with PCRE 7.2
http://tech.groups.yahoo.com/group/power-pro/message/31384
pcre.dll, regex.chm, the test script and output provided files have been updated. The second file included pcre.chm (updated to pcre 7.2 documentation).
Below are some notes from the pcre 7.2 update. I particularly like the new \K feature myself.
Regards,
SheriAdded more features from the forthcoming Perl 5.10:
(a) (?-n) (where n is a string of digits) is a relative subroutine or recursion call. It refers to the nth most recently opened parentheses.
(b) (?+n) is also a relative subroutine call; it refers to the nth next to be opened parentheses.
(c) Conditions that refer to capturing parentheses can be specified relatively, for example, (?(-2)... or (?(+3)...
(d) \K resets the start of the current match so that everything before is not part of it.
(e) \k{name} is synonymous with \k<name> and \k'name' (.NET compatible).
(f) \g{name} is another synonym - part of Perl 5.10's unification of reference syntax.
(g) (?| introduces a group in which the numbering of parentheses in each alternative starts with the same number.
(h) \h, \H, \v, and \V match horizontal and vertical whitespace.
A pattern such as (.*(.)?)* caused pcre_exec() to fail by either not terminating or by crashing. Diagnosed by Viktor Griph; it was in the code for detecting groups that can match an empty string.
A pattern with a very large number of alternatives (more than several hundred) was running out of internal workspace during the pre-compile phase, where pcre_compile() figures out how much memory will be needed. A bit of new cunning has reduced the workspace needed for groups with alternatives. The 1000-alternative test pattern now uses 12 bytes of workspace instead of running out of the 4096 that are available.