Public bug reported:
here is a very simple bash script using expr to match regex below :
--------- cut here ---------------
#!/bin/bash
#
STRDATA='find /var/log/ \( -name mail.log -or -name mail.log.1* \)'
VERSION=$(cat /etc/issue)
expr "${STRDATA}" : '^find /var/log/ [^`$<>]*$'
if [ $? -eq 0 ]
then
echo "MATCH ${VERSION}"
else
echo "NOMATCH ${VERSION}"
fi
--------- cut here ---------------
if you run the script on ubuntu 24.04 or older , it give the MATCH
answer
if you run the same script on ubuntu 26.04 ( up to date ) , it give
the NOMATCH answer !!
the regex it try to match is quite simple , and it should match no
matter the version.
it seems to be related to the \( \) characters in the STRDATA witch
should not be the case.
** Affects: ubuntu
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2156854
Title:
expr ( regex ) faulty behavior in ubuntu 26.04
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+bug/2156854/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs