fuzzyRegex

fuzzyRegex ( string regex , string _subject , float _threshold ) : string

Execute a fuzzy regular expression on a string.
Fuzzy RegEx uses a Levenshtein distance equation to measure the difference between the regular expression and potential text matches. The percentage difference between the regex pattern and the matched text is expressed as a "confidence score" (also as a percentage). If the confidence is above a set threshold, the result is returned. If it is below the threshold, it is discarded.
Returns the REPLACEMENT string corresponding to the string corrected by the fuzzy regex.

See also

regex

Parameters

regex

The regex. See this documentation and this one for the syntax.

_subject (optional)

The string in which regex will be searched. It doesn't have to be HTML code, you can put any kind of text in it. If null it is the page code in a FORPAGE script.

_threshold (optional)

Returns value of threshold used in matching methods to decide whether matching result signifies match or mismatch.