回复 28# lixiaolong
呵呵,这个有点意思。
试下:
Local $Str = _
'aaaaaa' & @CRLF & _
'abababab' & @CRLF & _
'abcdeaccc' & @CRLF & _
'abbcdeab' & @CRLF & _
'abcde' & @CRLF & _
'aaaaaa' & @CRLF & _
'abababab' & @CRLF & _
'abcdeaccc' & @CRLF & _
'abbcdeab' & @CRLF & _
'abcde' & @CRLF & _
'aaaaaa' & @CRLF & _
'abababab' & @CRLF & _
'abcdeaccc' & @CRLF & _
'abbcdeab' & @CRLF & _
'abcde' & @CRLF & _
'aaaaaa' & @CRLF & _
'abababab' & @CRLF & _
'abcdeaccc' & @CRLF & _
'abbcdeab' & @CRLF & _
'abcde' & @CRLF & _
'aaaaaa' & @CRLF & _
'abababab' & @CRLF & _
'abcdeaccc' & @CRLF & _
'abbcdeab' & @CRLF & _
'abcde' & @CRLF & _
'aaaaaa' & @CRLF & _
'abababab' & @CRLF & _
'abcdeaccc' & @CRLF & _
'abbcdeab' & @CRLF & _
'abcde' & @CRLF & _
'aaaaaa' & @CRLF & _
'abababab' & @CRLF & _
'abcdeaccc' & @CRLF & _
'abbcdeab' & @CRLF & _
'abcde' & @CRLF & _
'aaaaaa' & @CRLF & _
'abababab' & @CRLF & _
'abcdeaccc' & @CRLF & _
'abbcdeab' & @CRLF & _
'abcde' & @CRLF & _
'aaaaaa' & @CRLF & _
'abababab' & @CRLF & _
'abcdeaccc' & @CRLF & _
'abbjcdeab' & @CRLF & _
'abcde' & @CRLF & _
'aaaaaa' & @CRLF & _
'abcdeg'
Local $ts = TimerInit()
$str=StringRegExpReplace($Str, '(.)(?=[^\1]+\1)', '$%^&*')
$str1=StringRegExp($str,'(?m)[^$%^&*\s]',1)
MsgBox(0,TimerDiff($ts),$str1[0])
|