Regex to ignore multiple text to match two strings

Hi,

I need help on regex to check if two strings is match and ignoring multiple strings on both, white spaces and special characters.

Example:

String1 = “ABC-Corp.”
String2 = “ABC Corporation”

Output: True

String1 = “ABC Inc.”
String2 = “ABC Incorporation”

Output: True

String1 = “ABC_Ltd.”
String2 = “ABC Private Limited”

Output: True

Thanks in advance.

Hi,

How about the following?

Sample20221011-5.zip (3.8 KB)

inputKeywords = System.Text.RegularExpressions.Regex.Split(inputString,"[^A-Za-z0-9]").Where(Function(s) not String.IsNullOrEmpty(s)).ToArray()

targetKeywords = System.Text.RegularExpressions.Regex.Split(targetString,"[^A-Za-z0-9]").Where(Function(s) not String.IsNullOrEmpty(s)).ToArray()

Then

inputKeywords.Any(Function(s) targetKeywords.Contains(s))

Regards,