PHP and regex? Here are some suggestions:
'/(.*)/Us'
Maybe itβs better - the uppercase U makes the regular expression not greedy, which means that it will stop at the first <!-- , which may work. But important is s , which tells the regular expression to match a new line with a character . .
Depending on how confident you are in capitalization, adding i to the end will do a case-insensitive search.
source share