[Asterisk-Users] ASTCC - Regex: How to "Country" but "special City" different?

Ronald Wiplinger ronald at elmit.com
Mon Mar 14 16:25:12 MST 2005


Ronald Wiplinger wrote:

> I am trying to figure out a way to add something like:
>
> 61                 100 pennies               (Everything what is not 
> listed below)
> 61 78            150
> 61 5               130
> 61 342          180
>
> How could I do these (four) regex?    

Since nobody answered to my question, I tried to find it in the agi:

my $sth = $dbh->prepare("SELECT * FROM routes WHERE " . $dbh->quote($num
ber) . " RLIKE pattern ORDER BY LENGTH(pattern) DESC");

Does it mean I just need to use:
^61.*   100
^6178.*  150
^615.*   130
^61342.*   180

would already work? A number of ^6154333231 would be considered as the 
first case and cost 100 pennies ???


bye

Ronald




More information about the asterisk-users mailing list