2 Fixed invalid link [2].
source | link

POSIX does not define *? for EREs, which Bash uses, instead specifying thatinstead specifying that:

The behavior of multiple adjacent duplication symbols ( '+', '*', '?', and intervals) produces undefined results.

Bash uses the system regcomp/regexec for regular-expression matching. Apple's libc presumably does not implement the behaviour you want for *?.

There is no standard way to recover non-greedy matching semantics from greedy, though in this case at least some of them are unnecessary (the first [_[:alnum:]]*?, for example). Otherwise, you need to transform the expression to match something else or mutate the data in advance (and probably afterwards) to get the effect.

POSIX does not define *? for EREs, which Bash uses, instead specifying that:

The behavior of multiple adjacent duplication symbols ( '+', '*', '?', and intervals) produces undefined results.

Bash uses the system regcomp/regexec for regular-expression matching. Apple's libc presumably does not implement the behaviour you want for *?.

There is no standard way to recover non-greedy matching semantics from greedy, though in this case at least some of them are unnecessary (the first [_[:alnum:]]*?, for example). Otherwise, you need to transform the expression to match something else or mutate the data in advance (and probably afterwards) to get the effect.

POSIX does not define *? for EREs, which Bash uses, instead specifying that:

The behavior of multiple adjacent duplication symbols ( '+', '*', '?', and intervals) produces undefined results.

Bash uses the system regcomp/regexec for regular-expression matching. Apple's libc presumably does not implement the behaviour you want for *?.

There is no standard way to recover non-greedy matching semantics from greedy, though in this case at least some of them are unnecessary (the first [_[:alnum:]]*?, for example). Otherwise, you need to transform the expression to match something else or mutate the data in advance (and probably afterwards) to get the effect.

1
source | link

POSIX does not define *? for EREs, which Bash uses, instead specifying that:

The behavior of multiple adjacent duplication symbols ( '+', '*', '?', and intervals) produces undefined results.

Bash uses the system regcomp/regexec for regular-expression matching. Apple's libc presumably does not implement the behaviour you want for *?.

There is no standard way to recover non-greedy matching semantics from greedy, though in this case at least some of them are unnecessary (the first [_[:alnum:]]*?, for example). Otherwise, you need to transform the expression to match something else or mutate the data in advance (and probably afterwards) to get the effect.