举报
$str = '1qwertyuio' _ & @cr & '2qwertyuioqwertyuio' _ & @cr & '3qwertyuio' _ & @cr & '4qqqqw' _ & @cr & '5AddStr_qqqqw' _ & @cr & '6qwertyuio' MsgBox(8096, 'old', $str) MsgBox(8096, 'New', StringRegExpReplace($str, 'qqqq.+|\w+(qqqq.+)', ''))
凑合着用吧,没学好。 Huiseyu 发表于 2015-4-20 23:40
$Strd = 'qqqq' $StrSa = '1-- qwertyuio -- 1' _ & @CR & '2-- qwertyuioqwertyuio --2 ' _ & @CR & '3-- qwertyuio --3' _ & @CR & '4-- qqqqw --4' _ & @CR & '5-- wqqqq --5' _ & @CR & '6-- qwertyuio --6' MsgBox(8096, 'Finding "'&$Strd&'" --', $StrSa) MsgBox(8096, 'Where is the "'& $Strd &'" ^_^', StringRegExpReplace($StrSa, '\b(\w.+|\d.*)'&$Strd&'.+\s', ''))
$Strd = 'q' $StrSa = '1-- qwertyuio -- 1' _ & @CR & '2-- qwertyuioqwertyuio --2 ' _ & @CR & '3-- qwertyuio --3' _ & @CR & '4-- qqqqw --4' _ & @CR & '5-- wqqqq --5' _ & @CR & '6-- qwertyuio --6' MsgBox(8096, 'Finding "'&$Strd&'" --', $StrSa) MsgBox(8096, 'Where is the "'& $Strd &'" ^_^', StringRegExpReplace($StrSa, '\b(\w.+|\d.*)'&$Strd&'{2,}.+\s', ''))
本版积分规则 发表回复 回帖后跳转到最后一页
|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度
GMT+8, 2025-5-3 16:09 , Processed in 0.100545 second(s), 24 queries .
Powered by Discuz! X3.5 Licensed
© 2001-2025 Discuz! Team.