我正在使用excel VBA在另一个字符串中搜索子字符串,如下所示.
Dim pos As Integer
pos = InStr("I am studying at University of Texas at Arlington", "University of Texas")
Run Code Online (Sandbox Code Playgroud)
如果pos返回非负值,则表示我在字符串中有子字符串.但是,我需要更复杂的搜索,其中子字符串可以是"Univ of Tex":
InStr("I am studying at University of Texas at Arlington", "Univ of Tex")
Run Code Online (Sandbox Code Playgroud)
不起作用.
基于最大搜索项,我需要说子串存在.是否可以使用excel VBA?