I need a REGEX pattern that will transform a raw HTML block in the following way:
<!DOCTYPE html>
...
<anytag>
<h1>This is the less than < symbol. </h1>
<h1>This is the less than or equal to <= symbol. </h1>
</anytag>
Transforms to:
<!DOCTYPE html>
...
<anytag>
<h1>This is the less than < symbol. </h1>
<h1>This is the less than or equal to <= symbol. </h1>
</anytag>
So that the < character in only HTML tags is replaced, and nowhere else.
This is to solve an issue with syntax highlighting of html with prism.js here:
highlighting html with prism.js
Thanks Washington Guedes