Hello,
On 08/28/07 20:44, Brandon Armstead wrote:
Hello,
Is it possible to use an AVP as a regex string? Everytime I get
'regexp operation requires string value'. I'm looking for a way to
compare a value against a list of regex strings... i.e.
avp_check("$avp(some_avp)", "re/$avp(some_regex_avp)/g");
when $avp(some_regex_avp[0]) is equal to a regex string,
$avp(some_regex_avp[1]) is equal to some regex string, and so on and
so forth, any help would be appreciated, thank you!
no, in this way is not possible. Only in 1.2 series you can use
if($avp(some_avp) =~ $avp(some_regex_avp)) {...}
If you want to check more avps, you have to do recursive routes with
renaming of first $avp(some_regex_avp)
Cheers,
Daniel
------------------------------------------------------------------------
_______________________________________________
Users mailing list
Users@openser.org
http://openser.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@openser.org
http://openser.org/cgi-bin/mailman/listinfo/users