On 9/21/19 5:34 AM, Ilkka Virta wrote:
> On 21.9. 03:12, hk wrote:
>> Thanks for the reply. I was wrong in my report. It does match values like
>> aab and aaaaaab in its original form.
>
> In some systems, yes. (It does that on my Debian, but doesn't work at all
> on my Mac.)
>
>> It is syntatically correct as a regular expression.
>
> [[:space:]]*?(a)b isn't a well-defined POSIX ERE:
>
> 9.4.6 EREs Matching Multiple Characters
>
> The behavior of multiple adjacent duplication symbols ( '+', '*', '?',
> and intervals) produces undefined results.
It's ambiguous, but it can be interpreted as valid. I wonder why they used
"undefined" instead of the usual "unspecified."
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/