I would like to setup a script to intercept incoming SMS messages on my jailbroken iPhone 4S running iOS 6.1, from a specific number which contain a certain string recognisable by a 12 digit numerical string separated by one comma surrounded by parentheses eg.

Some message (123456,123456)

And then work on the numerical data (this is ordnance survey coordinates) to creat lat/long and send the ref to the TomTom app for routing.

I have this working through safari at present, where I copy and paste the SMS to a text area, and the script works via JavaScript. I would like to get rid of the manual element though.

This is for 999 emergency response for charity doctors.

Are there any dev tweaks out there that I can use or adapt that monitors the incoming SMS stream?

Thanks for looking at this,