Hi, I need help with extracting an Amazon order number from the field where people are asked to put the order number.
Amazon order numbers consist of numbers only and have the following format - 11X-YYYYYYY-YYYYYYY. I need to have the value in this exact format.
They all start with “11”.
“X” can be just 1 or 2 or 3 or 4.
“Y” can be any number.
Dash “-” is necessary after the first 3 numbers and then after next 7 numbers again.
People send me their order numbers in different formats like:
- 114-1234567-1234567 (the correct format);
- 11412345671234567 (without dashes);
- order 114-1234567-1234567 (with text);
- order 11412345671234567 (with text without dashes);
- order #11412345671234567 (text and # sign);
- #114-1234567-1234567 (with number sign);
- 114-12345671234567 (with just one dash);
- any combination of the above.
I need to make sure I get the order number in the proper format no matter how I received it.
Any help would be greatly appreciated.
Best answer by steph.n
Please let us know how we may be of further help.