I've recently started learning sed
. I did
$seq 10 | sed '/[^049]/d'
I was expecting
4
9
10
as output. But I got
4
9
Where am I making mistake in understanding this regex?
regular expressionsed
I've recently started learning sed
. I did
$seq 10 | sed '/[^049]/d'
I was expecting
4
9
10
as output. But I got
4
9
Where am I making mistake in understanding this regex?
Best Answer
The
1
in the number10
matches[^049]
so it's deleted.