I'm working on a script where I have a variable "Plate" that is set as text like "8SVPCCV1G0BB2". I need to use this variable to select a row in a different table where "Plate" may be wildcarded like:
8S
8SV
8SQPCC
*
In this case I would want it to select the row 8SV. But if my variable was "8PSVTTY2G0AB3" I would want it to match the * row which is a generic row.
I was looking into using regex or pattern matching for this but I'm new to both of them so I'm not having luck yet. Am I on the right track looking at those? Or is there a better way to do this matching? Thanks!