bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in expr


From: Jim Meyering
Subject: Re: bug in expr
Date: Sat, 15 Nov 2008 20:42:43 +0100

Dmitry Dobrushin <address@hidden> wrote:

> Hello!
>
> Met with an error.
>
> command:
> expr match "ut96_01_200" "\([0-9][0-9]_[0-9][0-9]\)"
>
> did not return, while another command:
>
> expr match "ut96_01_200" ".*\([0-9][0-9]_[0-9][0-9]\)"
>
> return : "01_20"
>
> What should I do to get the desired "96_01" result?

Here's one way:

  expr match "ut96_01_200" "[^0-9]*\([0-9][0-9]_[0-9][0-9]\)"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]