开发者

Regular expression replace in notepad ++

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:开发者_JAVA技巧

<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


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

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜