String LIKE Pattern

The pattern matching operator.


StringThe string you want to test (String).
PatternThe string pattern to match:
? - matches any single character
* - matches zero or more characters
# - matches any single digit (0-9)
/charlist/ - matches any single character in charlist
/!charlist/ - matches any single character not in charlist.

REMARKS
* This operator is equal in precedence to all the comparison operators.
* This operator will make a case insensitive comparison.
* The type of string comparison used depends on the Option Compare statement.
* For more information, refer to the Strings & Characters > LIKE Operator page.
* For the Microsoft documentation refer to docs.microsoft.com

"some text" Like "*" = True 
"ab__cd" Like "ab*cd" = True
"ab-cd" Like "ab?cd" = True
"ab1cd Like "ab?cd" =
"ab1cd" Like "ab#cd" =
"---ab" Like " "*ab" = True
"123ab" Like "###ab" = True
"123ab" Like "???ab" =
"123" Like "*" =
"abc" Like "###" =
"1" Like "/123/" =

© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top