|
本帖最后由 duquancai 于 2017-6-8 21:58 编辑
除了 涂色部分 的 还有的也叫“英文段落”。很明显“什么叫英文段落?先准确定义清楚!!!”举个例子:如图 红色圈内 难道不算“英文段落?”
Sub W_正则()
Dim mts As Object, reg As Object, Str$, doc As Document
Set doc = ActiveDocument: Str = Replace(doc.Content, Chr$(7), "")
Set reg = CreateObject("vbscript.regexp")
reg.Global = True: reg.MultiLine = True
reg.Pattern = "^[^一-﨩\r]+"
Set mts = reg.Execute(Str)
If Not mts Is Nothing Then
For j = mts.Count - 1 To 0 Step -1
With doc.Range(mts(j).FirstIndex, mts(j).FirstIndex + mts(j).Length)
.MoveEndWhile Chr$(13): .Text = Empty
End With
Next
End If
End Sub
|
评分
-
1
查看全部评分
-
|