Issue about green text - web-services

I am using Green Text Account and using http://developer.textapp.net/WebService api call for sending sms. In that we are taking mobile number from user and sending sms.
I am having query, if user in UK doesn’t enter the country code(+44) whether he can get the message if he enters mobile number in the format with leading zero and the server is in UK only.

The documentation for the Destinations parameter used in the SendSMS method says:
Phone numbers must be formatted in their full international format,
beginning with a +, followed by the appropriate country code, with
the removal of any leading zeros, and with no extraneous characters
or spaces. Numbers can include both mobile and landline numbers.
For example, mobile number (07836) 123-456 would be formatted as
+447836123456.
An example of a string containing multiple numbers:
+336456232125,+617766789712,+447836123456

Related

Watson Assistant: How to remove unwanted characters from input string

I am creating a chatbot where users need to input their phone. I need to be able to clean the user input string, removing any character that is not numeric. How can I do this in IBM Watson Assistant?
You can use the string functions like those with regular expressions to extract the phone number.
Another, maybe even better, option is to define a pattern-based entity type. The benefit would be that Watson Assistant could identify parts of the input as phone number entity and you could match dialog nodes or slots for it. If that is not found ("else") you could apply the extraction of numbers and try to guess if that is a phone number.
I would advise you handle user input at the client side. In your case, use the key-pressed event and an "If statement" to check that the character is a number (equal or greater than zero). Alternatively you can add the natural language understanding (Easy to configure machine learning service) to Watson Assistant to make it more intelligent. In this case, Watson will be able to know if data is a valid phone number or not.

Use Regular Expression inside URL for API call

I am calling one API that takes phone number as an input and provide response matching that phone number.
URL ends with this:
https://www.something.com/something&api_key=xxxx&sig=xxxx+"&%24filter=endswith(MobilePhone%2c'1234512345')
If in server mobile number is saved in same format as specified in url, that time it is giving me correct response.
But the problem is: If in server phone number is saved in different format like 12-3451-2345(with hyphen) or 12 3451 2345(with space), that time it is giving me empty response.
I tried using regular expression and wild card character in the above url, so that even if the hyphen and spaces are present in phone number in server, it should give me the correct response. But it didn't work. Please help me out with this.
Thanks in advance.

Can I verify that a Google Tag Manager id is valid?

It looks like, from inspection, that the form of a Google Tag Manager id is "GTM-XXXXXX" where the x's are [A-Z]|d, is this accurate? I need to verify whether the id's being submitted to a CMS are valid.
I've just wrote this one for our framework:
/^GTM-[A-Z0-9]{1,7}$/
Tested with 25 GTM container IDs in our account, all passed validation. You can try this expression out here.
The format varies. I see various combinations of numbers and letters, some just letters, none just numbers, most 6 characters, and few with 4 characters. There's no clear pattern. They begin with either a letter or number, and end with a letter or number.

Which format mask of phone number is safe for input for all countries?

I am making an input form for registering employees. I thought the number format in any country would fit in /\+(\d+)-\d\d\d-\d\d\d-\d\d\d\d/, where (\d+) is country code I assume to have different length and next goes exactly 10 digits. I need to create input fields and validation rules to make input as protected and unambiguous as possible but I am also worried if there could be actual numbers that don't fit this regex. Is there a safe international standard way of writing numbers?
There is no particular format which you can apply for all the countries phone number.
However \d* will be one of the choice with which you can proceed with but that too is not the best.
You may check National conventions for writing telephone numbers

Convert alphanumeric string to 16 digit GCID

I'm building our inventory feed for Amazon Seller Central in OpenOffice Calc but can't work out how to convert our inhouse product IDs to the Amazon required format GCID.
The standard-product-id must have a specific number of characters according to type: GCID (16 alphanumeric characters), UPC (12 digit number), EAN (13 digit number) or GTIN(14 digit number).
Our product IDs vary by manufacturer, eg:-
123456
AB123456
1234AB
Where the ID is numerical only I can format the cells with leading zeros, however this doesn't work if the cell contains letters.
My file has over 10,000 products so I'm wondering if there is a formula I can apply to all cells to instantly convert them to GCID?
It seems the question was asked when under a misapprehension but having noticed that the example 123456 AB123456 1234AB represents three different IDs and aware that padding to a specified length is quite a common requirement (eg see String.PadLeft Method) a suggestion for OpenOffice might be of use to someone, one day.
Convention is to pad with 0s but since some spreadsheets automatically strip these off the front of numbers (as first example) and databases tend to prefer that fields are of consistent format I suggest separating the padding from the example with a hyphen, to aid identification of alpha numeric codes and to force text format:
=REPT(0;15-LEN(A1))&"-"&A1