Community Library Entry

1

Regular Expression
Created·2026-02-25 17:44
Flavor·PCRE2 (PHP)

/
[\s]*<\/body.*>[\s]*<\/html.*>[\s]*\Z
/
gm
Open regex in editor

Description

Selects the </body> and </html> tags from a string. You can probably do this with something easier, but this works

Submitted by Twineee