Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regex match not working #1

Open
ghost opened this issue Dec 14, 2020 · 1 comment
Open

regex match not working #1

ghost opened this issue Dec 14, 2020 · 1 comment

Comments

@ghost
Copy link

ghost commented Dec 14, 2020

None of the regex matches are working in my script. Test case:

p='PC      : 0x4011aa98  PS      : 0x00060f30  A0      : 0x80082766  A1      : 0x3ffe3be0'
rePC='PC\s*:? (0x40[0-2][0-9a-f]*)'

if [[ "$p" =~ $rePC ]]; then
    echo Match!
else
    echo No match
fi

echo $BASH_VERSION

Output:

No match
5.1.0(1)-release

Hence gdb is never called.
Perhaps "my" bash is broken. I work on a mac, same behavior with preinstalled version and upgrade to newest.

@turgu1
Copy link

turgu1 commented Sep 14, 2021

Works fine on Linux with version 5.0.17(1)-release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant