Qt Creator: How use find result in replace result
-
I had the following. I would like to search my code for anything between quotes.
So:
@"This string"
"value"@Now with a regular expression, I can find these sections. But I would like to replace them
with:
@TEXT("This string")
TEXT("value")@So the found value should in some way be used in the replace action. How do I type this
in the replace field? Is there some 'magic' variable that can be used for this action? -
Hi,
Just continue with regular expressions
In the find box:
@("(This string|value)")@in the replace box
@TEXT(\1)@
-
Works perfect, thanks!
-
You're welcome !
Since the replacement works, please update the thread title prepending [solved] so other forum users may know a solution has been found :)