deprecatedclass %iKnow.Matching.Formats.RegularExpression
extends 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:
- regular expression (%String, mandatory): the regular expression to pass to the %Regex.Matcher object.
- replacement string (%String, default ""): if supplied, formatOutput will be populated by running this replacement string against the text and expression pair
- replace all (%Boolean, default 1): if set to 0, formatOutput will contain the result of ReplaceFirst() rather than ReplaceAll() when using replace functionality
method MatchSingle(string As %String, formatParams As %List, Output matchScore As %Numeric, Output matchedWordBits, Output isScattered As %Boolean, Output formatOutput)
as %Status
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.