I'm struggling to get a regex expression to work.
I need to allow the following transforms based on the existence of leading zeros...
- 001234 -> 1234
- 1234 -> 1234
- 00AbcD -> AbcD
- 001234.1234 -> 1234.1234
- 001234.000002 -> 1234.2
- 001234/000002 -> 1234.2
I've found the expression matches works well for transforms 1, 2 & 3 but I'm not sure how to match the (optional) second section demonstrated in 4, 5 & 6.
^0*([0-9A-Za-z]*$)