RegEx expression that will capture everything between two characters including multiline blocks

后端 未结 3 1051
迷失自我
迷失自我 2020-12-09 17:22

I want to capture all text & blocks of text between <% and %>.

For example:



Title Here
&l         


        
3条回答
  •  孤街浪徒
    2020-12-09 18:00

    I've been using Microsoft's Regex engine (provided by JScript in IE) and it has a 'multi-line' switch that effects the behaviour of ., but then still I've had problems I had to resolve using [\u0000-\uFFFF] which matches everything including EOL's or any control chars...

    So have a go with <%([\u0000-\uFFFF]*?)%>

提交回复
热议问题