in a bash script, I have :
mkv="xxxx E05 xxxx"
if [[ $mkv =~ E[0-9]{2} ]] ; then echo FOUND; fi
good. this tells me if $mkv matches against E[0-9]{2}, but this is not what I want.
I want to get the matching string (i.e. 05 in my example)
I put a reference () in my regexp, hoping I'd be able to get it later, but I could not.
I tried :
if [[ $mkv =~ E([0-9]{2}) ]] ; then echo FOUND $1; fi
if [[ $mkv =~ E([0-9]{2}) ]] ; then echo FOUND \1; fi
etc... but all of them failed
thanks !