im facing an issue and don´t know excactly how to manage it.
I have a Column with a Number f.e. 30002 (it is a Position ID)
To match this Number with another ID with would be 3002, i would need to remove one “0” from it.
What column format (integer or String) suits the operation of removing only one “0” from the Column, and how can i do this ?
Thanks for any help or advice.
Best regards
Yannick
Hi @Yannick_Jasper, there are different methods such as String Manipulator that can do this, but will it always be a 0 at the third character, or is it a zero as the middle of the number which can be of varying length? And finally, will that digit always be a zero? (And if not, what to return?)
Hey @takbb,
since this ID is out of a position number, there is always a integer as the first digit and one as the last digit. In Between there is one ID with 3 zeros and one ID from another source with 4 digits. And the digits between are allways zeros.
Hi,
And when the ID has 4 zeros, do you want to remove 1 or 2 of them? If you always want to remove one, you can use a String Manipulation node with this expression:
It uses regular expressions to pattern match your input, which must be of type String. It expects first one or more digits that are not 0, followed by one zero, followed by 2 or 3 additional zeros, followed by one or digits that are not zero again. Then it replaces this matched pattern by the non-zeros from the front and the last 2-3 zeros from the middle and the non-zeros at the end, omitting the first zero from the middle.
The result looks as follows:
I only need to match the longer ID to the shorter one. So in that case this expression fits pretty neat
Thanks for the quick Tipps
Kind Regards
Yannick