Hey everyone,
I have a field with values that contain one dash and some values contain multiple dashes. For example:
Name
James - Smith
Ryan - Jones
Dylan_ James - English - Burke
Elizabeth - kelly - Steve
How can I filter out the values that have multiple dashes? Any help would be greatly appreciated. Thank you!
Solved! Go to Solution.
Hi @Chirag_Gandhi07 ,
You could use a filter, with a Custom filter based on counting the number of hyphens. The REGEX_CountMatches function can count the number of hyphens. Those rows that have more than one will flow through the T output and those with only one through the F output in the below example
Cheers!
Esther
You can use REGEX_CountMatches in a formula tool and then filter on the result
Dan
Great minds think alike, @danilang !!
You can either step out into two tools, using a formula and filter, or put the formula directly into the filter.
@estherb47 @danilang Thank you both!!
@estherb47 @danilang For the values with multiple dashes, do either of you know how I could filter out values based on the name after the last dash of the value? For example:
John - James - Smith
I would like to filter out the names that end in Smith. Now some of the values could have Smith as middle name. I only want to filter out the values that have Smith as a last name.
Add in a filter with the following config
".*" matches any number of character and "Smith$" matches "Smith" but only at the end of a line(The "$" modifier).
Dan
@danilang Thank you. One last question, I want to split the values into to columns. For example:
John - James - Smith
I would like to split it up to two fields:
John - James
and
- Smith
Thanks again. Really appreciate the help! Not really familiar with REGEX