Hi LF Community,
Is there anyway to remove space characters from all the captured token.
Exemple : 10 000.00 will be 10000.00
Hi LF Community,
Is there anyway to remove space characters from all the captured token.
Exemple : 10 000.00 will be 10000.00
You can use this:
(\S*)(?:\s*)(\S*)(?:\s*)(.*)
That will remove up to 2 spaces from the text. If there are additional spaces, they will not be removed.
10 000.00 = 10000.00
10 000 000.00 = 10000000.00
10 000 000 000.00 = 10000000 000.00
As you see above, if there are more than 2 spaces, it will remove the first 2, then leave the subsequent spaces. You can expand the number of spaces it will remove by adding an additional...
(\S*)(?:\s*)
...to the BEGINNING of the expression (the ending (.*) needs to remain the same).
Examples:
(\S*)(?:\s*)(\S*)(?:\s*)(.*) - Removes the first 0-2 spaces
(\S*)(?:\s*)(\S*)(?:\s*)(\S*)(?:\s*)(.*) - Removes the first 0-3 spaces
(\S*)(?:\s*)(\S*)(?:\s*)(\S*)(?:\s*)(\S*)(?:\s*)(.*) - Removes the first 0-4 spaces
...etc...
The Workflow Token Editor also has a Trim function that removes whitespace before and after a token value. While it doesn't doesn't address the specific case you mention here (with white space in the middle), I thought it was worth mentioning.