Announcing PCRE - Perl Compatible Regular Expressions z/OS

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Announcing PCRE - Perl Compatible Regular Expressions z/OS

Postby zatlas1 » Mon Nov 26, 2012 3:05 am

Announcing PCRE - Perl Compatible Regular Expressions port z/OS
Hi all
I've ported the PCRE to native z/OS (no USS, just good ol' z/OS), including COBOL API. The installation file is available on: on the download page.

The concept of Regular Expressions is new to many COBOL programmers, so let me brief you please. Regular Expressions are a technology that allows you to find patterns on text strings in a way that is not available in COBOL or even Rexx. For example if you use a regular expression like this:
to match your text, you would find all ip addresses (something like in your text in one loop. (This particular regular expression looks for 3 strings of 1 to 3 digits followed by a period and all this, followed by one more string of 1 to 3 digits. The g in the end means look for all of them in the loop).
The power of regular expressions is widely used by Java,, C#, PHP and Perl, to mention only the most popular languages. The package that I've ported is exactly the one that is used by PHP and is highly compatible with Perl which is the standard setter for that stuff. In other words, I brought the most advanced form of Regular Expressions into the COBOL world.

I encourage all of you to learn about regular expressions and utilize this port. The license is BSD which pretty much allows you to use it and even resell software based on it with very few real limitations.
Please drop me a word through the forum if you want more details.
Posts: 60
Joined: Mon Mar 15, 2010 9:19 am
Has thanked: 0 time
Been thanked: 0 time

Re: Announcing PCRE - Perl Compatible Regular Expressions z/OS


Return to IBM Cobol


  • Related topics
    Last post