So basically we have a form that users fill out and based on what they pick in the form, it texts different members in the company. We list the groups we want to text inside Excel, then based on what they pick in the form, it loops through the group IDs in Excel and pulls members from 365. Pulls their numbers from 365 and loops through each member to text them via Twillio.
This is all working perfectly but the issue is that if a number has formatting in it, it breaks. So the numbers have to be formatted 12345677878 instead of like (234) 567-7878. What's the easiest way to scrub the special characters from numbers before it passes it to Twillio? Right now we're trying to make sure every number we put into 365 is formatted without the characters but this isn't ideal. We would want it to look for parenthesis, periods, spaces, etc. The other challenge is that it has to begin with a country code (1).