I need a regular expression that will match on all terms in a set of search terms. If the user types “bat sun” then I need to match any text entries that have words starting with “bat” AND starting with “sun”. So, “Sunday Batman” and “Batmobile sundance” should both match, but “Sunday” or “Batman” won’t match because not all search terms are matched.
I’m using the expression within MongoDB (official C# driver) to support searching.
Thanks!
Probably a regex like below if you really want to use regex:
Of course you want to make it ignore case.