Skip to main content

%iKnow.Matching.Formats.RegularExpression

Class %iKnow.Matching.Formats.RegularExpression Extends Format [ Deprecated, System = 4 ]

This class implements Regular Expression matching as an implementation for %iKnow.Matching.Formats.Format, leveraging the ICU implementation in %Regex.Matcher. This implementation does not support matched word indicators, scattered match detection or anything but boolean match scores. Also, it will only verify within entities and therefore never find matches that cross an entity boundary.

Format parameters:

  1. regular expression (%String, mandatory): the regular expression to pass to the %Regex.Matcher object.
  2. replacement string (%String, default ""): if supplied, formatOutput will be populated by running this replacement string against the text and expression pair
  3. replace all (%Boolean, default 1): if set to 0, formatOutput will contain the result of ReplaceFirst() rather than ReplaceAll() when using replace functionality

Properties

Matcher

Property Matcher As %Regex.Matcher;

Methods

MatchSingle

Method MatchSingle(string As %String, formatParams As %List, Output matchScore As %Numeric, Output matchedWordBits, Output isScattered As %Boolean, Output formatOutput) As %Status