I have requirement of following reg-ex pattern:
Sample string :
<html> a test of strength and <h1> valour </h1> for <<<NOT>>> faint hearted <b> BUT </b> protoganist having their characters <<<CARVED>>> out of gibralter <b> ROCK </b>
This above is single string in which I want to strip out every HTML tag
and retain <<<xyz>>>
.
My attempt:
(^|\n| )<[^>]*>(\n| |$)
Can someone please critically review this ?