I am working on searching my data store for specific values coming from a comma separated string. I found a good way to get this started from this post
I took the comma separated string, joined it with | to get results. The new problem is it’s finding all matches that are similar. Is there a way to search and make sure it’s an exact match only?
Also, if I figure this out, how do I turn the results back into a comma separated string of keys?
Welcome to the Make community!
Your pattern is missing opening and closing brackets ()
that should go on the outside of the join function, to be a valid pattern.
The final pattern should look like this:
(waiversigned|freedaypass)
If you already know the values “waiversigned,freedaypass” in advance, you don’t need to split and join them. Just paste the above pattern directly.
samliew – request private consultation
Join the unofficial Make Discord server to chat with other makers!
1 Like
Thanks! I won’t know the values ahead of time, it’ll come over as a long comma separated list, this was just an example so I didn’t have to keep sending data over from the other app.
I feel, even with the above, waiversigned would still return lighttherapywaiversigned since they match in “likeness”
That is correct, the regex will partial match.
To match complete words, you can use the word boundary placeholder on both sides:
\b(waiversigned|freedaypass)\b
1 Like