\w is meant to match any word character.  If you insert the expression into
this tester, you can try various patterns to see what it matches:
http://gskinner.com/RegExr/

the email address that I type into the testing tool and the email address
that I use as the keyword in the text message is the same and is seen as
valid by the testing tool but apparently not by Kannel.


Nikos Balkanas wrote:
> 
> Hi,
> 
> Have you tried it? It doesn't look right. What is \w?
> 
> Test it by part:
> 
> [0-9a-za-z.-...@[0-9a-za-z._]+
> 
> And add more parts as you go.
> 
> BR,
> Nikos
> ----- Original Message ----- 
> From: "fegul" <ftseg...@gmail.com>
> To: <users@kannel.org>
> Sent: Monday, May 17, 2010 4:44 PM
> Subject: Regex problems in sms-service and keywords
> 
> 
>>
>> I have two sms-services defined, one that catches messages with a keyword
>> that matches a regular expression (using 'keyword-regex' in the 
>> sms-service)
>> and one that catches everything else (using keyword = default) to a
>> different script.
>>
>> The regex compiles and I've tested it using some online tools but kannel
>> still sends messages that would be valid according to the regex in the 
>> first
>> sms-service to the default sms-service instead.
>>
>> Any ideas as to why?  I'm testing it using fakesmsc with MTMO direction
>> switching and composing the text in interactive mode like so:
>>
>> 555 100 text m...@me.com the message content
>>
>> The regex in question is:
>> ^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$
>>
>> It is meant to seek out valid email addresses
>> -- 
>> View this message in context: 
>> http://old.nabble.com/Regex-problems-in-sms-service-and-keywords-tp28583542p28583542.html
>> Sent from the Kannel - User mailing list archive at Nabble.com.
>>
>> 
> 
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Regex-problems-in-sms-service-and-keywords-tp28583542p28583852.html
Sent from the Kannel - User mailing list archive at Nabble.com.


Reply via email to