esp32-backtrace icon indicating copy to clipboard operation
esp32-backtrace copied to clipboard

regex match not working

Open ghost opened this issue 4 years ago • 1 comments

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.

ghost avatar Dec 14 '20 05:12 ghost

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

turgu1 avatar Sep 14 '21 11:09 turgu1