use POSIX regexp

^[[:digit:]]{7}$

-----Original Message-----
From: Kevin Reed [EMAIL PROTECTED]
Sent: 15 ??? 2008 ?.
To: seik
Subject:Using keyword-regex 

> I am attempting to trap messages sent consisting of only 7 digit numbers. 
> The number is not valid unless they are exactly 7 digits so I wrote an
> sms-service like:

>     group = sms-service
>     keyword = tr
>     keyword-regex = ^(\d{7})$
>     name = TankReading
>     aliases = store
>     exec = "/usr/local/smsgateway/sms-command.pl store '%k'"
>     max-messages = 2
>     concatenation = false

> I even tried changing the rejex to:

>     keyword-regex = ^\d{7}$

> Neither appears to work.  It just falls through to the default sms-service
> which sends back an invalid command.

> Any ideas what is wrong?

> If I use the service setup as:

>     group = sms-service
>     keyword = tr
>     name = TankReading
>     aliases = store
>     exec = "/usr/local/smsgateway/sms-command.pl store '%s'"
>     max-messages = 2
>     concatenation = false

> It works fine if the sender includes TR space then the 7 digit number. 
> I'm trying to make it so that they don't need to add the TR, just send the
> store number.



Reply via email to