Is it possible to use a wildcard with the Instr() function?
For example, if I want to determine if a string contains a string that has any alphabetic character followed by a hyphen, how would I do that? I need to use a wildcard because I want it to return false if the string contains a space followed by a hyphen. I only want it to return true if there is an alphabetic character followed by a hyphen.
The following doesn't work:
For example, if I want to determine if a string contains a string that has any alphabetic character followed by a hyphen, how would I do that? I need to use a wildcard because I want it to return false if the string contains a space followed by a hyphen. I only want it to return true if there is an alphabetic character followed by a hyphen.
The following doesn't work:
Code:
If Instr(strLookingIn, "?" & "-") > 0 Then