I am trying to find pattern matching with Regex. The used case is as follows:

```
listStrings1 = ['abc','def', 'ghi']
listSubstrings1 = ['a', 'b', 'e']

```

listStrings1 is the strings inputs and listSubstrings1 is the pattern which needed to be matched. so output should look like

```
['a', 'b'], ['b'], []

```

but currently I am getting like

```
['a', 'b', None], ['b', None, None], [None, None, None]

```

Here is what I tried so far

```
def research(substring, string):
    match = re.search(substring, string)
    emptystr = ''
    if match is not None:
        return emptystr
    else:
        return substring

def substringsearch(sublist, string):
    matchlist = list(map(lambda y: research(y, string), sublist ))
    return matchlist

listm1 = list(map(lambda x: substringsearch(listSubstrings1, x), listStrings1))
print(listm1)

```

Also time is another crucial factor as size of string input and substring input is around 100k so if possible without using loops.

Any help is appreciated. Thanks!!