Reputation: 801
The following command does not return anything and i think my regex is good ?
echo 'The.Big.Bang.Theory.S07E01.VOSTFR.720p.WEB-DL.DD5.1.H.264-GKS.mkv' |\
sed -n '/The.Big.Bang.Theory*VOSTFR*720p*WEB-DL*.mkv/p'
Thanks!
Upvotes: 0
Views: 80
Reputation: 801
Works like this :
echo 'The.Big.Bang.Theory.S07E01.VOSTFR.720p.WEB-DL.DD5.1.H.264-GKS.mkv' |\
sed -n '/The.Big.Bang.Theory.*VOSTFR.*720p.*WEB-DL.*.mkv/p'
I forgot the dots :/
Upvotes: 0
Reputation:
y*
means zero or more y
s. R*
means zero or more R
s. etc.
You probably want
/The\.Big\.Bang\.Theory.*VOSTFR*720p.*WEB-DL.*\.mkv/
Upvotes: 0
Reputation: 10170
\.
matches the .
char.*
matches any char zero or more times:
sed -n '/The\.Big\.Bang\.Theory.*VOSTFR.*720p.*WEB-DL.*\.mkv/p'
Upvotes: 2