Code: Select all
Texts = "Ağrı Dağı" "Bolu Dağı" "Van Gölü" "Istrancalar"
RegExMatch(Texts,"\s?[^\^]\K\x22\w*?[ıI]\w*?\x22\*?",UO)
Code: Select all
Texts = "Ağrı Dağı" "Bolu Dağı" "Van Gölü" "Istrancalar"
RegExMatch(Texts,"\s?[^\^]\K\x22\w*?[ıI]\w*?\x22\*?",UO)
Code: Select all
Texts = "Ağrı Dağı" "Bolu Dağı" "Van Gölü" "Istrancalar"
RegExMatch(Texts,"\s?[^\^]\K\x22\w*?[ıI]\w*?\x22\*?",UO)
MsgBox,% UO ; "Istrancalar"
Rohwedder wrote: ↑12 Oct 2021, 07:17Hallo,"Istrancalar" is extracted here.Code: Select all
Texts = "Ağrı Dağı" "Bolu Dağı" "Van Gölü" "Istrancalar" RegExMatch(Texts,"\s?[^\^]\K\x22\w*?[ıI]\w*?\x22\*?",UO) MsgBox,% UO ; "Istrancalar"
What should the RegEx do?
I rewrote the pattern. No ok. I took a long hiatus from messing around with regex, I must be doing some silly things.
Code: Select all
Texts = "Istrancalar" "Ağr ıDağı" "Bolu Dağı" "Van Gölü" "Istrancalar"
MsgBox % RegExMatch(Texts,"O)[^\^\w !;|*()-]?(\x22[\s\w]*[ıI][\s\w]*\x22\*?)",UO)
MsgBox,% UO.Count() ; "Istrancalar"
Code: Select all
Texts = "Istrancalar" "Ağr ıDağı" "Bolu Dağı" "Van Gölü" "Istrancalar"
MsgBox, % res := RegExReplace(Texts, """[^Iı""]+?""( |$)")
arr := []
while RegExMatch(Texts, "O)""([^""]*)(I|ı)(?-2)""", m, m ? m.Pos + m.Len : 1)
arr.Push(m[0])
for k, v in arr
str .= v . "`n"
MsgBox, % str
Users browsing this forum: Spawnova and 162 guests