Three blanks to process

Hi experts,

I’m completely lost. I receive a field containing three blanks. I only want to map this field when it’s containing a Unit of Meassure / or just a value.
Using /[^ ]/ in the sequence label does not really work it’s always going into default step. Even when I modify the pipeline and delete the blanks.
Using string.length return “3”.

My flow looks like:
Label: empty
Switch: /helpfield
Evaluate labels: false
Sequence1 Label: /[^ ]/
Sequence2 Label: $default

Default is always winning. Why what do I do wrong?

Hope anyone can help.



Try setting evaluate labels to true…

Label: empty
Switch: empty
Evaluate labels: true
Sequence1 Label: %helpfield% = /[^ ]/
Sequence2 Label: $default

slight typo in my response…

Sequence1 Label: %helpfield% <> /[^ ]/

/[^ ]/ means NOT null, NOT empty, and contains at least one non-space character. By placing <> in front of it, the condition is reversed to mean null, empty, or blanks.

Hi Dennis,
When ever in Branch you want to do the match based on the value u get in to the condition variable, mention the Evaluate labels: true, as this will allow the branch condition to evaluate teh condition u mention in the switch statement

Setting evaluate labels to true isn’t necessary to do the comparison. As jday points out the regex of /[^ ]/ will be matched with any string that is not null, not empty and not just spaces.

Why don’t you trim the string using pub.string.trim and then do the comparison?


Hi Dennis,

Please try below regular expression for matching the 3 spaces:
Sequence1 Label: /[ +]/

Here “+” match the preceding item zero or more times.