Calculate input for given result and sanitizing rules

Hi,

I'm looking for a way to code a program that calculates the input for given result and sanitizing rules in python/or as a concept.
For example, there are 2 given rules:
1. Replace "(=" to "(!--"
2. Replace "=)" to "=--)"

The result should be:
"(=abc=)"

I'm looking for the input.

Do you have an idea how to solve this problem with a program?

I'm grateful for every input.

Comments

  • edited December 6

    Your requirements are unclear. You want code that tells you what's being sanitized? Or you want your code to sanitize?

Sign In or Register to comment.