回复 28# 131738
哦,是这样的,前辈1楼里说不必区分大小写,以为前辈专门需要区分大小写,所以这样写了.对不起前辈了
正则改成这样可以匹配大小写:
Local $Str = _
'###Function###' & @CRLF & _
'AdlibUnRegister' & @CRLF & @CRLF & _
'###Description###' & @CRLF & _
'Unregisters an adlib function.' & @CRLF & @CRLF & _
'###Syntax###' & @CRLF & _
'AdlibUnRegister( [ "function" ] )' & @CRLF & @CRLF & @CRLF & _
'###Parameters###' & @CRLF & _
'@@ParamTable@@' & @CRLF & _
'function' & @CRLF & _
' [optional] The name of the adlib function to be Unregistered. See remarks for more information.' & @CRLF & _
'@@End@@' & @CRLF & @CRLF & _
'###ReturnValue###' & @CRLF & _
'@@ReturnTable@@' & @CRLF & _
'The number of adlib functions currently registered.' & @CRLF & _
'@@End@@' & @CRLF & @CRLF & @CRLF & _
'###Remarks###' & @CRLF & _
'If the function name is not specified then the last registered function will be unregistered.' & @CRLF & @CRLF & _
'###Related###' & @CRLF & _
'AdlibRegister' & @CRLF & @CRLF & @CRLF & _
'###Example###' & @CRLF & _
'@@IncludeExample@@'
MsgBox(0, '原字符串', $Str)
Local $Test = StringRegExpReplace($str, '(?im)^Function(?=[\r\n])', '文件')
MsgBox(0, '替换结果', $Test)
|