Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Quantifier ( braces in regexp )



On Tue, Jul 24, 2007 at 01:21:19PM +0400, Artur Penttinen wrote:
>                                                                                                                                                                       
>   may be zsh/pcre ? (man zshmodules)                          
                                                                                                           
On Tue, Jul 24, 2007 at 05:20:43AM -0400, Clint Adams wrote:
> On Mon, Jul 23, 2007 at 09:31:17AM +0200, antho.charles@xxxxxxxxx wrote:
> > I search through the doc and I can't find a way to use quantifier in
> > expression like [0-9]{2,3} in standard regexp. Is there only * (#), + (##)
> > and ? (|) implemented?
> 
> Aside from what Stephane's said, you can (if you've got the zsh/pcre
> module) do
> 
> [[ "42" -pcre-match [0-9]{2,3} ]] && print match

Nice timing ;)
I forget this module, it's cool for scripting but I'd like to have
something more handy for globbing on the commandline, but thanks
guys :)


-- 
Anthony CHARLES



Messages sorted by: Reverse Date, Date, Thread, Author