Interesting stuff. Thank you for letting us know.
Because of the "\s" issue, I assume that it is a ccsid problem. That is
what needs to be debugged. I hope that I can do that today or tomorrow.
Am 01.11.2019 um 17:48 schrieb Craig Richards:
A slightly more efficient version might be
or in your case
(I'm very surprised the \s suggested by David did not work - that's pretty
Essentially this is wrapping the one-or-more whitespaces \s+ with (?>)
which is called Atomic Grouping.
The \s+ is greedy which is to say it will grab as many whitespace
characters as it can and then look at the next part of the expression to
carry on matching (in your case the filea) If that fails to match, it will
backtrack, so if it grabbed 3 spaces, it will drop one and then try to
match and so on until it can't backtrack anymore.
The atomic grouping stops that backtracking process - essentially once it
gets past the closing parenthesis, it throws away all states so it doesn't
go back and try with, say 2 spaces then one space.
Maybe not an issue for you and maybe not supported if not even \s is
supported but it's a good performance thing to be aware of for the
situations where it's obvious that once you've done a greedy match and the
next bit has failed - there is no point in dropping the last character of
the greedy match and retrying the expression again.
As an Amazon Associate we earn from qualifying purchases.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.