Replace tool

In this code, the applyReplaceRules function takes the input text and the replace rule string as parameters. It splits the rule string into individual rules, then iterates over each rule, creating a regular expression pattern and using replace to perform the replacement in the input text. Finally, the modified text is returned as the output. Please note that this code assumes that the replace rules are provided in the correct format: pattern->replacement, and each rule is separated by a comma character. The code also handles basic error checking for invalid rules.


Parameters

String
Regular->String

Output