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]\)"