使用strfind函数。S='Findthestartingindicesofthepatternstring';strfind(S,'in')ans=2151945使用regexp函数。str='batcatcancarCOATcourtcutctCAT-scan';..