Skip to main content

SearchAndRedact

Searchs words and adds redact to it.

Syntax

expression.SearchAndRedact(props);

expression - A variable that represents a ApiDocument class.

Parameters

NameRequired/OptionalData typeDefaultDescription
propsRequiredSearchPropsNo description provided.

Returns

ApiRedactAnnotation[]

Example

This example search some word in document and adds a redact annotation to it.

let doc = Api.GetDocument();
doc.SearchAndRedact({text: "Lorem", matchCase: false, wholeWords: false});
doc.ApplyRedact();
console.log(`We searched for the word lorem in the document and applied redact annotation to all matches.`);