Hi, i have identified what looks to be a bug in grep v3.10, the bug is not
present in v3.8 or v3.9, to reproduce the bug please see the attached bash
script.

The bug looks related to the use of the regex [^\d]+ which then ends up
resulting in no match.

If you need any more details then please let me know, I am very keen to get
this bug squashed as I make heavy use of grep in my scripts.

Many Thanks!.
#!/bin/bash

# script to demonstrate bug with grep v3.10, v3.9 and v3.8 correctly match the expected string

grep_string=$(echo 'dev tun123' | grep -P -o -m 1 '[^\d]+')
echo "expected string matched is 'dev tun' actual string matched is '${grep_string}'"

Reply via email to