[asterisk-dev] New wildcards for pattern matching
Matt Riddell
lists at venturevoip.com
Wed Feb 24 19:52:24 CST 2010
On 25/02/10 2:30 PM, Steve Murphy wrote:
> OK, a final '~' meaning 0 or more of the preceding character or class. Hmmm.
> Instead, would it be OK to make it 1 or more (this seems easier, as no
> existing
> pattern char can stand for null input).
Yah totally.
> I *don't* think it would be good to allow it in the middle, eg, "_XX8~XX",
> because then you get into some sticky recursion trying to determine
> if stuff like "12888" is a match or not, as you might be tempted to
> absorb all the 8's
> and not leave a couple for the end of the pattern. You then back up and
> try other paths,
> and that's where things get complicated. And, then you can have more
> than one ~ in
> the pattern, and wow, you'd need rules to disambiguate.
Yah agree - I think the type of situation where you'd want to put in in
the middle is probably more suited to regex or something anyway.
It's really just a safe replacement for _X.
--
Cheers,
Matt Riddell
Managing Director
_______________________________________________
http://www.venturevoip.com/news.php (Daily Asterisk News)
http://www.venturevoip.com/exchange.php (Full ITSP Solution)
http://www.venturevoip.com/st.php (SmoothTorque Predictive Dialer)
More information about the asterisk-dev
mailing list