提问:如何提取表达式14 *(2+3)+5中的数字和运算符?
在网站 https://regexper.com 测试 \d+|\+|\-|\*|\/|\(|\) 可以正确匹配数字和运算符
Haystack:="14 *(2+3)+5"
NeedleRegEx:="O)(\d+|\+|\-|\*|\/|\(|\))"
Match := {Len: {0: 0}}, FoundPos := 1
While (FoundPos := RegExMatch(Haystack, NeedleRegEx, Match, FoundPos + Match.Len[0]))
OutputDebug % Match.Value(0)
输出如下: