|
From: | GNU bug Tracking System |
Subject: | bug#52873: closed (expr unexpected syntax error) |
Date: | Wed, 29 Dec 2021 19:53:02 +0000 |
Your message dated Wed, 29 Dec 2021 11:52:25 -0800 with message-id <3df84a2c-05aa-7aea-6d38-6ebe80a3b76f@cs.ucla.edu> and subject line Re: bug#52873: expr unexpected syntax error has caused the debbugs.gnu.org bug report #52873, regarding expr unexpected syntax error to be marked as done. (If you believe you have received this mail in error, please contact help-debbugs@gnu.org.) -- 52873: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=52873 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems
--- Begin Message ---Subject: expr unexpected syntax error Date: Wed, 29 Dec 2021 12:42:24 +0000 I'm getting an error from the following:[martin@fedora ~]$ expr ')' : '.*'
expr: syntax error: unexpected ')'There also seems to be a similar problem with:expr '(' : '.*'Here's the version:[martin@fedora ~]$ expr --version
expr (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Mike Parker, James Youngman, and Paul Eggert.And a uname for good measure:[martin@fedora ~]$ uname -a
Linux fedora 5.15.7-200.fc35.x86_64 #1 SMP Wed Dec 8 19:00:47 UTC 2021 x86_64 x86_64 x86_64 GNU/LinuxThanks,Martin
--- End Message ---
--- Begin Message ---Subject: Re: bug#52873: expr unexpected syntax error Date: Wed, 29 Dec 2021 11:52:25 -0800 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 On 12/29/21 08:31, Davide Brini wrote:I think you need to use '+' before the offending tokenYes. That's a GNU extension. If you want to be portable to any POSIX implementation, you can use this instead:expr "X(" : '.*' - 1 A similar example is given in the POSIX spec for 'expr': https://pubs.opengroup.org/onlinepubs/9699919799/utilities/expr.html As this is not a bug, I'm closing the bug report.
--- End Message ---
[Prev in Thread] | Current Thread | [Next in Thread] |