I'm trying to match the choice of a pipe-delimited list of choices of a ComboBox store in an INI file.
Code: Select all
Apple|Orange|Cherry||Kiwi
Code: Select all
Apple||Orange|Cherry|Kiwi
Code: Select all
(\^|\|)(.*)\|\|
Code: Select all
Apple|Orange|Cherry||Kiwi
Code: Select all
Apple||Orange|Cherry|Kiwi
Code: Select all
(\^|\|)(.*)\|\|
Code: Select all
For each, list in ["Apple|Orange|Cherry||Kiwi", "Apple||Orange|Cherry|Kiwi"] {
RegExMatch(list, "([^|]+)\|\|", m)
MsgBox, 64, Choice, %m1%
}
Code: Select all
data := "
(
Apple|Orange|Cherry||Kiwi
Apple||Orange|Cherry|Kiwi
)"
For k, v in StrSplit(data, "`n")
MsgBox, % (m, RegExMatch(v, "\w+(?=\|\|)", m))
Thanks a lot, mikeyww. Where I can find a list of the Built-in Variables for the for-loop command, each, LIST; each, LINE. I have never seen that in the documentation.mikeyww wrote: ↑12 Aug 2022, 18:17Code: Select all
For each, list in ["Apple|Orange|Cherry||Kiwi", "Apple||Orange|Cherry|Kiwi"] { RegExMatch(list, "([^|]+)\|\|", m) MsgBox, 64, Choice, %m1% }