I opened a PMR at IBM asking for help and what they told me is that the IBM i version of regcom()/regexec() follows more of a Posix/Unix specification such as:
So the following pattern returns the expected result:
pattern = 'dcl-f[[:space:]]+filea';
I asked IBM to update the documentation.
For now I stay with the current implementation of iSphere Source File Search and I updated the iSphere help text and added a "Help" link to the search dialog. These changes will be available with the next release and, of course, with the current beta.
Von: WDSCI-L [mailto:wdsci-l-bounces@xxxxxxxxxxxxxxxxxx] Im Auftrag von Mark Murphy
Gesendet: Montag, 2. Dezember 2019 21:05
An: Rational Developer for IBM i / Websphere Development Studio Client for System i & iSeries
Betreff: Re: [WDSCI-L] Source Search
If you are using the C regular expressions API, then you are not using
PCRE, it is much closer to GNU regular expressions which are far more
limited. In fact I have not really been able to find good documentation on
what is supported. If you want a more robust regular expression like the
ones you can test at regex101.com, you should use the ones available in
International Components for Unicode. It is not fully PCRE, but much
closer. I suppose you could search for the service program and use ICU if
it is there, and the regular C API's if it is not.
On Fri, Nov 1, 2019 at 12:30 PM Tools/400 <thomas.raddatz@xxxxxxxxxxx>
Expression "dcl-f\s+filea" did not work for me using iSphere search. I
did just a short test and I will debug that later on.
But "dcl-f[ ]+filea" or "dcl-f +filea" worked well.
This email is confidential, may be legally privileged, and is for the intended recipient only. Access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence. Please delete if obtained in error and email confirmation to the sender.