[regex] Extract substring using regexp in plain bash