I have this output in my shell by typing the command foobar
:
NAME ZONE STATUS ACTION LAST_ERROR
foobar--docker-worker-yyb55u-4ivg europe-west1-c RUNNING NONE
I want to grep the complete name. Which I try doing like this:
$ foobar | grep -q -P "(foobar--[^\s]+)"
but this returns me: foobar--docker-worker-yyb55u-4ivg europe-west1-c RUNNING NONE
Which I don't understand because I tested the regex here: https://regex101.com/r/sX471v/1
Any advice is welcome, thanks!