I have an application that presents a list of items and multiple filtering criteria.
Some of the filtering criteria take a string value for the filter, and the application currently supports basic wildcarding (* for anything, ? for any single character within a search term).
I've been asked to provide two changes to the syntax/capabilities for all fields that take a string:
Allow searching for reserved characters (treat ? as a ? rather than as a wildcarded character, same for *: have some way to treat it as an asterisk instead of a wildcard.
Support basic 'Or' functionality specified within the search term. That is, match it if the value is 'String A' or 'String B'
I was considering wrapping the string in quotes for treating it as a literal.
e.g. "Question?" would only match 'Question?' but not 'Questions' as it currently does.
I have only come up with ideas for the 'Or' functionality like using a pipe | character between search terms. I'd love something better.
Ultimately, I can do whatever, but I'm wondering if there's some sort of existing convention that would be simple, clear, obvious or ideally all of those.
So, my question is: is there an existing syntax convention for search terms that allows wildcarding, literals, and alternatives that I could use rather than coming up with my own?
The target user base would be something akin to a sysadmin. I don't want something as complicated as regular expressions, but the application won't be used by someone's grandma... unless that grandma is a sysadmin, I guess.