1 to many string wildcard matching

Hi all,
how would you go about this task?
I want to produce a list of all file names in column B which ‘belong’ to column A. In this case the file name in column B will begin with the column A value, but I need to find all instances where it matches, so I guess I need to use a command which repeats a wildcard match against every row value in column B for for each row in column A?

needs-matching.xlsx (4.8 KB)

A B
thing1 thing1.jpg
other3 other3.doc
item3 item3.jpg
thing1_second image.jpg
other3-b.gif
item3-rearthing1.jpg
thing1_3rd.jpg
thing1_fourth.jpg
thing12345.doc
thing1b.gif

the output can be a column C which contains the column A value which corresponds to the column B value.
I’m also not sure how to handle potential duplicate matches.

regards,
James

Hello @DWJames

You can find useful the following workflow.

The only change that would be required will happen in the String Manipulation node (row3):
Instead:
"(?i)(.*?(" ,
For letter case match and beginning of text as your requirement:
"(.?(" ,
BR

2 Likes

I’ve also just done the same task in two different ways (one which will handle multi-matching as well):

3 Likes

Thank you both, that gave me what I needed :slight_smile:
In the end my data was more complex, so I had to use a brute force approach…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.