[TAG] Need a shell regex; having problems
Jay R. Ashworth
jra at baylink.com
Thu Jun 3 00:13:45 MSD 2004
On Wed, Jun 02, 2004 at 09:11:37PM +0100, Thomas Adam wrote:
> On Wed, 2 Jun 2004 15:57:37 -0400
> "Jay R. Ashworth" <jra at baylink.com> wrote:
> > I'm trying to come up with a shell glob that will match this
> > traditional regex, and I don't know bash well enough to get it right;
> > any suggestions appreciated:
> >
> > ...\.[0-9]{2,5}aa.
> >
> > sel.234aab
> > prc.37382aaa
> > out.8888aad
>
> ```
> ???\.[0-9]{2,5}aa.*
> ''
>
> This assumes for bash that you have:
>
> ```
> shopt -s extglob
> '''
" 'Oh', said Pooh. "
Why not use dots for the first three as well, then?
Cheers,
-- jra
--
Jay R. Ashworth jra at baylink.com
Designer Baylink RFC 2100
Ashworth & Associates The Things I Think '87 e24
St Petersburg FL USA http://baylink.pitas.com +1 727 647 1274
"They had engineers in my day, too." -- Perry Vance Nelson
More information about the TAG
mailing list