修改了正则匹配
从光标处选择, 直到任何空白字符,包括空格、制表符、换页符 ” ‘ ] }), ;停止
代码如下
^Right::
; slen := 0
Candy_Saved := ClipboardAll
Loop
{
Clipboard :=
SendInput ^+{Right}
SendInput ^c
ClipWait, 1
RightChar := Clipboard
; slen += StrLen(RightChar)
if (RegExMatch(RightChar, "[\S|,|;|""|'|`]|}|)]$")){
Break
}
lastChar := SubStr(RightChar, 0)
; MsgBox, % lastChar
if (lastChar == "" || lastChar == " ") {
Break
}
}
SendInput {Ctrl UP}
SendInput {Shift UP}
Clipboard := Candy_Saved
Return