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

Re: Quantifier ( braces in regexp )



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



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