I have a custom field for storing educational data. A person's degree is stored as either Btech or B.Tech or B.Tech. so what should I give in search option so that I can get all 3 in my result in a single search?

1 Answer 1


You can use basic pattern valid in LIKE operator of sql where clause.

For Eg - Using %tech% would result in all three rows.

Similarly you can use [, ], and _ symbols.

To find more about search strings - see Pattern Matching in MySQL (AFAIK you can use only LIKE patterns here not REGEXP).

  • did you mean B%tech% in order not to get eg MATech as a result?
    – petednz - fuzion
    Jun 23, 2017 at 20:35
  • yes, that would work, B%tech% will list any value starting with B followed by some chars and then tech <some chars> which will exclude MATech from the result Jun 25, 2017 at 6:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.