On 7 April 2018 at 07:04, Viktor Dukhovni <postfix-us...@dukhovni.org>
wrote:

>
>
> > On Apr 7, 2018, at 1:59 AM, J Doe <gene...@nativemethods.com> wrote:
> >
> > Ah, interesting - that must be it, then.
> >
> > This is on an Ubuntu 16.04 LTS server.  I can see the dependencies
> compiled in from Ubuntu’s page [1] and GNU libc is listed.  [2] seems to
> suggest that regular expressions are part of GNU libc.
> >
> > Is there another way I can confirm that ?
>
> FreeBSD 11 (POSIX):
>
>   $ echo "1 b" | egrep '\d\s\w'
>   $
>
> MacOS High Sierra (POSIX with GNU or similar extensions):
>
>   $ echo "1 b" | egrep '\d\s\w'
>   1 b
>   $
>
> Your Ubuntu system most likely will match the MacOS results.  Which means
> that your regexp table is not portable, but happens to work on your system.


On my Ubuntu 16.04.4:
$ echo "1 b" | grep -E '\d\s\w'
$ echo "1 b" | grep -E '[0-9]\s\w'
1 b
​
But I agree OP should switch to using pcre tables, it is supported under
Ubuntu.

Reply via email to