Re: bash leaks the old var when using =~ in a function with local BASH_REMATCH

2022-06-02 Thread Chet Ramey
On 5/28/22 4:08 PM, Emanuele Torre wrote: Bash Version: 5.1 Patch Level: 16 Release Status: release Description: If `[[ $str =~ $re ]]' is executed from a function in which `BASH_REMATCH' is local, bash will "leak" the old *global* `BASH_REMATCH' variable. This

bash leaks the old var when using =~ in a function with local BASH_REMATCH

2022-05-28 Thread Emanuele Torre
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin' -DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash