I would like to provide wildcard matching in a search box for users of my application. I have a QTableView filled with details of parts used in manufacture, obe column is the part number which is an alphanumeric field with some "-". Id like the user to be able to enter "123*" into the search box to have all the parts not starting with "123" to be hidden. Similarly with "*678", "*66*88*" etc. That is, multiple wildcard characters in the search string.
I was looking at QRegularExpression documentation and saw this in the section "Notes for QRegExp users":
There is no equivalent of wildcard matching in QRegularExpression. Nevertheless, rewriting a regular expression in wildcard syntax to a Perl-compatible regular expression is a very easy task, given the fact that wildcard syntax supported by QRegExp is very simple.
Can you please show me how I can "very easily" rewrite a "*88*99*" string to a regular expression?
I should say that some of my users are techie and will appreciate the ability to use regexp in the search field, but most aren't and I'd like to give them the easy wildcard option ('cos I'm a kind coder :) ).