[Asterisk-Users] regexp

Noah Miller noahisaacmiller at gmail.com
Fri May 19 07:42:06 MST 2006


Hi Domenico -

> > First, you can remove the quotes aorund your variable
> > reference.  I've seen examples with it, but you don't need
> > it.
> I'm not sure: if variable is empty, you got an error.
> In addition, double quotes around text that may contain spaces
> will force the surrounded text to be evaluated as a single token.

Ah.  Good point.  I guess it is a good idea to use quotes.


> > Second, I'm not sure what the tilde does after the equal
> > sign, but asterisk won't understand it.
> What?
> ':' and '=~' are regexp operators in Asterisk.

Ah, again.  Undocumented functionality.  I looked through the source
code for ast_expr2.c, and you are so correct.  Still, in this
application, I think you can just use a single equal sign.


- Noah



> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>



More information about the asterisk-users mailing list