Match substring with a string

Hi guys,

I need your help.
In a column I have a text with variable content and variable length, I need to find if in this string is contained a fixed length number and if this number matches with a secondo column.

Here it is a DB as example

ID Comment Code Status
1 Client is ok, 34818814 is the code 34818814 Match
2 No Answer 65013887 No Match
3 Client is not ok 10138920 No Match
4 28306809 28306809 Match
5 - 89464368 No Match
6 91543282 No Match
7 35787694 11524789 35787694 Match

Let me know if you need more info

R

Hi @Reader91 , what would the expected results be for this?

ID Comment Code Status
8 3578769411524789 35787694

The string “3578769411524789” does contain “35787694”. Should it match in this case or not?

Yes, it should match both if they are a unique number or two different numbers

R

Hello @Reader91
You may want to review some past topics in forum discussing this subject in detail with different approaches.

‘multiline’ is just a detail adding complexity, but all these discussed concepts in posts can be applied to your use case.

BR

Hi @Reader91 ,

Just to make sure you understood the use case I was trying to make, in the case of “3578769411524789”, “35787694” is not a standalone string, but rather a sub-part of a string. It is different from your ID 7 example of “35787694 11524789” where “35787694” is on its own.

For example, should “135787694” or “357876940” match for “35787694”?

EDIT: In the meantime I put something very simple together based on your current answer that looks like this:
image

Input:
image

Output:
image

Here’s the workflow: Match substring with a string.knwf (8.6 KB)

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