Regex - nested patterns - within outer pattern but exclude inner pattern

后端 未结 5 1913
野的像风
野的像风 2020-12-11 12:41

I have a file with the content below.

 ${ dontReplaceMe } ReplaceMe ${dontReplaceMeEither} 

I want to match \'Replac

5条回答
  •  囚心锁ツ
    2020-12-11 13:13

    usually it is a bad idea to use regex when there is structured markup involved. in some special cases it might be ok, but there are better tools to parse html and then you can use regex on the text nodes.

提交回复
热议问题