Skip to main content

%iKnow.Matching.Formats.RegularExpression

deprecated class %iKnow.Matching.Formats.RegularExpression extends %iKnow.Matching.Formats.Format

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

Property Inventory

Method Inventory

Properties

property Matcher as %Regex.Matcher;
Property methods: MatcherGet(), MatcherGetSwizzled(), MatcherIsValid(), MatcherNewObject(), MatcherSet()

Methods

method MatchSingle(string As %String, formatParams As %List, Output matchScore As %Numeric, Output matchedWordBits, Output isScattered As %Boolean, Output formatOutput) as %Status
Inherited description:

Implementations of this method check whether an individual string complies with the format this class represents, returning a matchScore (0..1) and optional matchedWordBits, isScattered and formatOutput through output parameters.

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab