It’s better to switch to Regex101. That has a build-in feature to generate the correct syntax for KNIME.
In Java, \d becomes \\d etc.
For your specific use-case, I’d say it’s better to share an example with input and expected output since it’s really difficult to provide a proper solution without seeing what you’re trying to achieve.