I don't think so. However, you should probably not use the Like
operator anyways if case-insensitivity is important - instead, use regular expressions.
Dim re As New System.Text.RegularExpressions.Regex("^.+ough$", System.Text.RegularExpressions.RegexOptions.IgnoreCase)
re.IsMatch("rough") ' True
re.IsMatch("tough") ' True
re.IsMatch("rOUGH") ' True
re.IsMatch("ough") ' False
There's a lot to learn, but basically .
is equivalent to ?
, .*
is equivalent to *
, and \d
is equivalent to #
. You have to wrap it in ^
and $
for equivalency, too. Regular expressions are much more powerful and will do what you need.
You should probably add Imports System.Text.RegularExpressions
if you plan to use them a lot. They can be compiled and reused for efficiency, too.