Returns an Element object representing the current text match. |
<table class="wysiwyg-macro" data-macro-name="unmigrated-wiki-markup" style="background-image: url(/plugins/servlet/confluence/placeholder/macro-heading?definition=e3VubWlncmF0ZWQtd2lraS1tYXJrdXB9&locale=en_GB&version=2); background-repeat: no-repeat;" data-macro-body-type="PLAIN_TEXT"><tr><td class="wysiwyg-macro-body"><pre> public Element Element{ get; } </pre></td></tr></table> |
<p>Public ReadOnly Property Element() As Element</p> |
//--- 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(); } |
'--- 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 |