- #1
James889
- 192
- 1
Howdy,
I came across a regular expression i couldn't get my head around.
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 ?
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 ?