[asterisk-dev] Better pattern matching
jsmith at digium.com
Wed Aug 1 13:48:50 CDT 2007
On Wed, 2007-08-01 at 11:44 -0500, John Lange wrote:
> Searching the archives I can see that better pattern matching has been
> discussed a number of times.
> There have even been patches submitted and discussions about how there
> are regexp libraries available under BSD style license that could be
> incorporated into Asterisk.
> Yet, nothing ever makes it into the released code.
Yes, I've been one of the people who have been more vocal than most
about this. I really think it's a good idea to be a little more
flexible in our pattern matching ability. That being said, I can see
where the Asterisk developers are coming from too -- they're worried
that this will severely impact the time it takes for Asterisk to do
pattern matching. The current pattern matching syntax works fairly well
for numeric extensions, but is pretty difficult work with if you trying
to do pattern matching on names or alphanumeric extensions. For
example, try coming up with a pattern match that'll match the name Nancy
(either upper or lower case) followed by two digits. It becomes even
more difficult when dealing with letters that fall outside the English
While I personally think regular expressions are a pretty cool idea, I
know not everyone is sold on them. If I remember correctly, there's
even an RFC with a very complete pattern matching syntax defined (which
I can't find right now, of course).
Hopefully, one of the Asterisk developers will stumble across this post
and take pity on us and help us out!
Community Relations Manager
More information about the asterisk-dev