- My text:
mmhmmh here_is_you 05451ab8 888
- My regex:
mmhmmh \w* ([ab0-9]*) \d*
- My sed command:
echo "mmhmmh here_is_you 05451ab8 888" | sed -n 's/mmhmmh \w* \([ab0-9]*\) \d*/\1/p'
- Result:
05451ab8888
instead of05451ab8
Why doesn't sed respect my regex? I checked and my regex should correctly select the expected result.