I've got the following regex
<\?php\n//{{([^*]|[\r\n])*\?>
To match the following
<?php
//{{
...
?>
The problem is, once the regex matches this, it'll match the following
开发者_如何学Python<?php
...
?>
So basically, once it matches the //{{ it'll match any php tag after.
Cheers!
I don't know if I understood your regex correctly, but you can try a non-greedy solution:
<\?php\n//{{([^*]|[\r\n])*?\?>
Just append ? to the *.
精彩评论