[asterisk-dev] New wildcards for pattern matching

Steve Murphy murf at parsetree.com
Thu Feb 25 12:05:53 CST 2010


On Thu, Feb 25, 2010 at 9:31 AM, Nick Lewis <Nick.Lewis at atltelecom.com>wrote:

> >Let's leave out ?, too
>
> That's a shame - I was hoping to use it to indicate exactly one ascii
> char - oh and also an 'A' wildcard for one alphanumeric char!
>

Been thinking about ? for 0-or-1 occurrences, and it hit me that in the
case of dialplan usage, it would probably be not useful. Think about it,
when would anyone want to do:

_213555?1212

and make one of the 5's optional? I can't think of any kind of situation
where
that would be useful.  So maybe I'm worrying about nothing. ? for ANY
single ascii char is actually not a bad usage. actually I like it.

A would seem more for just Alphabetic chars, wouldn't it? But who the heck
would just want an
alpha and exclude a number also? So A standing for alpha-num is a good
choice also.


> >That leaves us with ~ and %.
>
> I would be comfortable with using % for zero-or-more - and limiting it
> to the end of the pattern (which makes implementation easier).
>
> groovy


> --N_L
>
>
-- 
Steve Murphy
ParseTree Corp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20100225/9c0207ef/attachment.htm 


More information about the asterisk-dev mailing list