...
Description |
---|
Excerpt |
---|
Returns an Element object representing the current text match. |
Signature | ||||
---|---|---|---|---|
| ||||
public Element Element{ get; }
{signature}{signature: |
Signature | ||||||
---|---|---|---|---|---|---|
| }
| |||||
Public ReadOnly Property Element() As Element
{signature}
{example}{code:csharp|title=C#} |
Example |
---|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
//--- Search for social security numbers using regular expressions and delete them. WordApplication app = new WordApplication(); Document doc = app.Open(@"C:\somedoc.doc"); SearchMatch[] matches = doc.Search("\s\d\d\d-?\d\d-?\d\d\d\d\s"); foreach(SearchMatch match in matches) { match.Element.Delete(); } {code} {code: |
Code Block | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
| |title=
| }|||||||||
'--- Search for social security numbers using regular expressions and delete them. Dim app As New WordApplication() Document doc = app.Open("C:\somedoc.doc") Dim matches As SearchMatch() = doc.Search("\s\d\d\d-?\d\d-?\d\d\d\d\s") For Each match As SearchMatch In matches match.Element.Delete() Loop {code} {example} |
Example |
---|