The original regex seems to be trying to match simple HTML tags - either in plain text or URL-encoded form – without attributes that are embedded in multi-line text. eg This is some <b>bolded</b> text.
If so, then something like this:
(?i)[\s\S]*?((?:<|%3C)(?:\/|%2F)?[a-z\d]+(?:>|%3E))[\s\S]*?
would capture the tags within the text (and wouldn't fail when given the input you provided.)
Explained bit by bit, here's how it works:
(?i) -- makes the regex case insensitive
[\s\S] -- is an atom to match any character - even newlines
*? -- match 0 or more, but as few as possible, of the previous atom
( -- start a group that captures all matches until the closing )
(?: -- start a group that doesn't capture it's contents
<|%3C) -- match either a < or %3C (which is the URL-encoded version of <)
(?:\/|%2F)? -- optionally match a / or %2F
[a-z\d]+ -- match one or more letters or numbers
(?:>|%3E) -- match the closing tag
) -- close the open group