# sh bashre.sh 'aa(b{2,3}[xyz])cc' aabbxcc aabbcc
regex: aa(b{2,3}[xyz])cc
aabbxcc matches
capture[1]: bbx
aabbcc does not match
Um artigo bem legal sobre uso nativo de regex em bash, com um script de exemplo
Ref.:
Maio 27, 2008 às 23:44 (linux, shell, xnx)
Tags: bash shell script regex
# sh bashre.sh 'aa(b{2,3}[xyz])cc' aabbxcc aabbcc
regex: aa(b{2,3}[xyz])cc
aabbxcc matches
capture[1]: bbx
aabbcc does not match
Um artigo bem legal sobre uso nativo de regex em bash, com um script de exemplo
Ref.: