I’m curious if it is possible to get some help building a regEx that can check for matches of letter placement against incoming strings. For instance, lets say I had ‘f’ in the first character, ‘o’ in the second and so on… then validate that as I loop strings.
Hopefully this makes sense! Please let me know if you need any more details! Thanks!
ps. This is all in plain ol’ ASCII.
Edit:
To be more clear about the character position matching, for instance, if I had a pattern of:
- e - p
I’d like to be able to have the string of ‘derp’ match as true (since it’s hitting the second and fourth characters).
any word character
*e?p -> \w+e\wp
or any aplha
*e?p -> [a-z]+e[a-z]p
and for 4 characters
any word character
?e?p -> \we\wp
or any aplha
?e?p -> [a-z]e[a-z]p
UPDATE
Use the above patterns to create more specific matches where * and ? are dos like.
For example:
mis?i?n -> mis[a-z]i[a-z]n
*i?n -> [a-z]+i[a-z]n
The first one will match “mission” and the second one will match “mission” and “passion” and “fashion”…