I'm searching for strings matching the pattern [A-Z]\W*[0-9]+
, so that in
V-2345
35A235
Q252
the V-2345
and Q252
would match. In another list, I want to find equivalent items that fit the same regex pattern, so that potential matches would include:
V ++ 2345
Q 252
but not
V-252
Q//2345
Basically, if an item matches the pattern in the first list, I want to search for that letter prefix and number suffix in the second list. Is there a term for using regex to do this kind of search? I know that I can just write my own search by using string manipulation to get the letter and number, then use them to compose a separate regex pattern for each search of the second list, but I'm wondering if there's something built into typical regex flavors (I'm using C# in this case) that serves this purpose so that I can just use the original pattern.