Parsing through SMS text with expressions

Post your questions and help other users.

Moderator: Martin

Post Reply
webo
Posts: 4
Joined: 24 Sep 2013 10:57

Parsing through SMS text with expressions

Post by webo » 25 Oct 2013 10:40

I'm looking for a way to send an SMS to my phone with AutoMagic and have it search through sms_text for specific words.

Essentially, I would send one or more keywords in an SMS (separated with a space) and I would have multiple expressions responsible for handling what happens for each type of keyword.

I have it working if it's only one keyword but when I send an SMS with more than one keyword, it stops working.

Should I use contain() for this? or indexOf()? or is there a better way?

EDIT: Answered my own question. Used the following:

Code: Select all

matches(sms_text, ".*keyword.*")

Post Reply