Platforms to show: All Mac Windows Linux Cross-Platform
FAQ.How to search with regex and use unicode codepoints?
dim r as RegExMbsdim s as stringdim c as Integers="123 äöü ABC 456"r=new RegExMBSif r.Compile(".ö.") then c=r.Execute(s,0) MsgBox str(c)+" "+str(r.Offset(0))+" "+str(r.Offset(1)) // shows: 1 4 10 // 1 for ubound of the offset array // 4 for 4 bytes before the matched pattern // 10 for the 10 bytes before the end of the matched patternend ifr=new RegExMBSif r.Compile(".\xF6.") then // finds ö using Unicode codepoint c=r.Execute(s,0) MsgBox str(c)+" "+str(r.Offset(0))+" "+str(r.Offset(1)) // shows: 1 4 10 // 1 for ubound of the offset array // 4 for 4 bytes before the matched pattern // 10 for the 10 bytes before the end of the matched patternend if