Howdy,

I came across a regular expression i couldn't get my head around.

Code:
' there $$[^ ]*$$'
Code:
echo "Howdy there neighbor" | sed 's/there $$[^ ]*$$//'
returns howdy.

It's the subgroup that's a bit confusing.

match any sentence which contains banana then a space and then a non-space character.

Is this the correct way of interpreting this regular expression ?
 So, basically, it matches "there " (the word 'there' followed with a blank space) followed with as many consecutive non-blank spaces as it can find "[^ ]*" and replaces that with nothing. You can test that only replaces what I said, if you test it with "Howdy there neighbor what up?" Oh, the back slashes are there to escape the parenthesis within the double quotes

 Quote by gsal .. followed with as many consecutive non-blank spaces as it can find "[^ ]*" and replaces that with nothing.

Is this the same as saying 'match as much as possible up until a white space is found' ?