[Asterisk-Users] equivalent to SetvarIf ?
snacktime
snacktime at gmail.com
Tue Nov 22 01:17:23 MST 2005
On 11/21/05, Wilson Pickett <spamsucks2005 at gmail.com> wrote:
> > Is there a syntax I can use to set a variable based on the evaluation
> > of an expression? I need something that will work in 1.0.9 and 1.2.
>
> Isn't this what you're looking for:
>
> set(VARIABLE=$[NULL${something}=NULL]})
I'm not quite sure I understand that. However using a regex works.
But I'm getting an error that I halfway understand and don't know how
to fix.
Set(something=8001114444)
This works:
Set(var2=$["${something}" : "([1-9])"])
This doesn't, giving me an 'invalid repetition count(s)' error:
Set(var2=$["${something}" : "([1-9]{2,10})"])
Anyone know what's wrong with my syntax?
Chris
More information about the asterisk-users
mailing list