Help with Find and **Replace** using Regex in Designer Application

Hi all,

I’m using the Find and Replace functionality within the Designer Application (as described here) to search for patterns using regular expressions.

My use case: I want to find all text substitutions, and enclose them with a html-tag (a very common scenario for many users I’m sure).

The Find functionality works perfectly for locating text substition using (%[a-zA-Z0-9_]+%), but I’m encountering an issue with the Replace step.

Specifically, I want to replace the found regex pattern (e.g., %rostertitle%) with <u>%rostertitle%</u> (or %abc% with <u>%abc%</u>).

In many other software or IDEs, this can be done using backreferences like \1 to refer to the captured group. However, I’m struggling to find the correct syntax for using this in the Designer Application’s Replace function, if it is possible at all. Currently tried to replace with <u>/1</u> or <u>$1</u>without success.

Could anyone clarify how to achieve this in Designer, or if backreferences are supported in the Replace functionality?

Thank you in advance!

1 Like

For backreferences use $1 rather than \1:

For example, to underline all substitutions:

Thanks a ton @sergiy, this works seamlessly.

I was actually sure I tried it yesterday without success, but probably had typos or so!

Good and thank you for the confirmation. If you are using this to achieve some consistent highlighting for style, perhaps you could describe your use case in this thread.