You can do this with
replaceFirst($YourString, '0*' ,'')
Tested this with this result:
So this does not touch any other ‘0’s appearing later in the string.
You can create a MF to remove the prefix zero’s. (example below)
Create a boolean variable (e.g PrefixZero), set a while loop with the condition PrefixZero is true.
In the while loop you add a decision that checks if the string starts with a ‘0’ (startsWith($origString,’0’).
If this is true you can change the origstring by removing the first zero (replaceFirst($origString,’0’)
If the outcome of the decision is false you set the boolean PrefixZero on false and break the loop event.
SO in you example you will have following string values
00012Abc → true → 0012Abc → true → 012Abc → true → 12Abc → false → break loop