1012| 6
|
[提问] (求助)字符串按数字分割输出表 |
1明经币
最佳答案;(xd::string:regexps "\\-*[A-Z]+\\-*|\\d+" "CD61JY78K--45-A99SE" "")->("CD" "61" "JY" "78" "K--" "45" "-A" "99" "SE")
(defun XD::String:RegExpS (pat str key / end keys matches x)
(if (not *xxvbsexp)
(setq *xxvbsexp (vlax-get-or-create-object "VBScript.RegExp"))
)
(vlax-put *xxvbsexp 'Pattern pat)
(if (not key)
(setq key "")
)
(setq key (strcase key))
(setq keys '((" ...
| ||
发表于 2022-11-8 15:52:05
|
显示全部楼层
点评
我的代码废了,就是觉得正则的简洁,有点伤心
评分
| ||||||||
发表于 2022-11-8 16:37:34
|
显示全部楼层
评分
| ||||||||
发表于 2022-11-8 17:02:36
|
显示全部楼层
评分
| ||||||||