I'm running invoices through Quick Fields and it picks up the amount total as 1, 100. 00 What pattern matching expression can I use to ignore the spaces? Keep in mind that the totals won't always be the same, but no matter what, it always puts a space after the comma and the decimal. Thank you.
Question
Question
How do I remove white space from an amount?
asked on January 7, 2018
•
Show version history
0
0
Answer
SELECTED ANSWER
replied on January 8, 2018
[^\s] will return everything that's not a space. Set Pattern Matching to return all matches with no spaces if it finds multiple hits.
1
0
Replies
replied on January 8, 2018
You could use a regular expression to separate the initial value into 3 tokens then combine those 3 tokens into one Value token. This expression can be used to get the 3 separate tokens
(\S+)\s+\S+\s+\S+
^ gets the first value up to the comma
\S+\s+(\S+)\s+\S+
^ gets second value up to the period
\S+\s+\S+\s+(\S+)
^ gets the third value after the period.
You could then combine those three values into one which will remove the white spaces.
1
0
replied on January 10, 2018
Thank you!
0
0
You are not allowed to follow up in this post.