Hello, I have a variable in my workflow whose length is not consistent. I want to run an action in the workflow to remove the last two characters (always the last 2). I believe regular expression is the way to do this, but I do not know how to format the action. Thanks!
Solved
Removing last two characters from string
Best answer by Garrett
Interesting. Why does “count collection” count the number of characters? Shouldn’t it return a value of 1 since there is only one value in the collection?
It extract each character and insert into a collection. “apple” → [“a”, “p”, “p”, “l”, “e”]
Once the length is known, its easy to extract from a string eg 1st three chars, last three chars etc
Also, I think a simpler way to do this (thanks to your help) would be apply a regex and split using the expression .{2}$
With regex, there is many ways to manipulate strings.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.
