I'm looking for some assistance with JavaScript/Regex when trying to format a string of text. I have the following IDs:
00A1234/A12
0A1234/A12
A1234/A12
000A1234/A12
I'm looking for a way that I can trim all of these down to 1234/A12
. In essence, it should find the first letter from the left, and remove it and any preceding numbers so the final format should be 0000/A00
or 0000/AA00
.
Is there an efficient way this can be acheived by Javascript? I'm looking at Regex at the moment.