PHP preg_replace删除字符串中的第一个HTML元素

I would like to remove the entire first element of a html string (it is always a paragraph) in PHP.

my current approach is using:

$passage = preg_replace('/.*?\b'.'</p>'.'\b/s', '', $passage, 1);

This doesn't work because of the special characters in </p>

I know that the following will remove everything from the string before the word 'one' appears

$passage = preg_replace('/.*?\b'.'one'.'\b/s', '', $passage, 1);

You have to escape '/' with a backslash if you're using it as a delimiter: So it's <\/p>

Edit: You should add a ^ to mark the start of the string.

Another solution: You can use other delimiters like #.

Full code $passage = preg_replace('#^.*?</p>#is', '', $passage, 1);

you can use this regExp
$passage = preg_replace('/^<p>\s*(.+?)\s*</p>$/is','$1', $passage, 1);