Skip to main content

I’m trying to create a new value based on the first letter of each word in a string. I tested the regex ‘\b(\w)’ and the returned value is correct, but when I used that regex in the @SubstringRegularExpression(), it only returned the first letter of the first word.

@SubstringRegularExpression(@Value(ID),\b(\w)) where ID is “MARKHAM RD/ORANGE BLVD, SANDFORD”. You can see in the regex editor, it is correct.

 

This is the result of the substring

 

SubstringRegularExpression doesn't work with capture groups, which your regular expression does.

Use a StringSearcher, enter the name of a new list under Advanced, after All Matches List Name. 
This will create a list of all values that meet your regular expression.
Next use a ListConcatenator to join all values of the list in a single variable.

 


SubstringRegularExpression doesn't work with capture groups, which your regular expression does.

Use a StringSearcher, enter the name of a new list under Advanced, after All Matches List Name. 
This will create a list of all values that meet your regular expression.
Next use a ListConcatenator to join all values of the list in a single variable.

 

great solution!


Reply