[Asterisk-Users] Using REGEX function

Wes Santee wsantee at gmail.com
Wed May 17 09:30:44 MST 2006


Kevin P. Fleming wrote:
> Wes Santee wrote:
> 
> This was just recently fixed in SVN branch 1.2, and the fix will be part
> of the 1.2.8 release that will appear later this week.
> 
> In the meantime, you can work around the problem by storing the regex
> string itself in a variable, then using a variable substitution in the
> ${REGEX()} function call, like this:
> 
> exten => ...,1,Set(MATCH="[2-9][0-9]{2}[2-9][0-9]{6}")
> exten => ...,n,Set(isnum=${REGEX(${MATCH} ${EXTEN:2})})

Thanks!  This looks like a good work-around until the new release is out.

Cheers,
-Wes



More information about the asterisk-users mailing list