Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.forterulesengine.io/llms.txt

Use this file to discover all available pages before exploring further.

removeExtraParenthesis(strToClean): string
Defined in: src/parsing/parsing-utilities.ts:700 Cleans up a given string by removing unnecessary parentheses and replacing specific patterns with placeholders for later restoration. The function processes two types of patterns:
  1. Substrings starting with “FC:”.
  2. Parentheses containing logical operators (“AND” or “OR”).
The function performs the following steps:
  • Identifies and replaces “FC:” patterns with temporary placeholders.
  • Iteratively removes or replaces parentheses based on their content.
  • Restores the replaced placeholders back into the string.

Parameters

ParameterTypeDescription
strToCleanstringThe input string to be cleaned of extra parentheses.

Returns

string The cleaned string with unnecessary parentheses removed and original patterns restored.