0

I need to do a regex find and replace:

every

"<xsl:if test="any/text()"

has to be replaced by

"<xsl:if test="normalize-space(any/text())"

I have tried Find:

<xsl:if test="(.*)/text() 

replace by

<xsl:if test="normalize-space(\1/text())

but it doesn't work..

so every if statement where /text() is present, replace it by normalize-space(../text())

thx

1 Answer 1

6

() are special chars in regexes. You need to escape them to be able to match them. Like this:

<xsl:if test="(.*)/text\(\) 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.