I want to search any of the three different strings and their variations on a given string.
If any of these three strings CAT-17*, or CAT-19*, or CAT-20* are there on a given string, then there is a match. Here the asterisk means zero or more characters, were the string may have subsequent characters (example: CAT-17, or CAT-17J1, or CAT-19, or CAT-19F2, or CAT-20, or CAT-20MM3)
I have tried the below regex and it is matching CAT-20J1 but not CAT-20, same goes for other strings also. if I add some subsequent characters it is matching, but not when the string is alone.
\b(?:CAT-17([\w]+)|CAT-19([\w]+)|CAT-20([\w]+))\b
How can I fix this for regex to accept 0 or more characters after the main string, for example, CAT-20