Re: Bash [[ foo =~ regex ]] behavior changed with last update, gentoo patches?

2025-05-09 Thread David C Rankin
On 5/9/25 5:02 AM, Ralph Corderoy wrote: I doubt your understanding is correct. I think it more likely the ‘0/8’ this time was short enough to match /([^.]{1,3})$/ in the first regexp and either: - it has never been short enough in the past, e.g. ‘0/24’, or - they've slipped through but not tri

Re: Bash [[ foo =~ regex ]] behavior changed with last update, gentoo patches?

2025-05-09 Thread Ralph Corderoy
Hi David, > [[ $1 =~ ^([^.]{1,3})[.]([^.]{1,3})[.]([^.]{1,3})[.]([^.]{1,3})$ ]] ... > [[ $1 =~ ^([^.]{1,3})[.]([^.]{1,3})[.]([^.]{1,3})[.]([^.]{1,3})/(.*)$ ]] ... > $ ipsa 38.0.0.0/8 ... > parsed the IP as 38 0 0 0/8 (with the "/8") instead of 38 0 0 0 I doubt your understanding is correct. I th