Regular Expression to return the contents of a HTML tag received as a string of text
- by Nathan Hernandez
I have a string in my code that I receive that contains some html tags. It is not part of the HTML page being displayed so I cannot grab the html tag contents using the DOM (i.e. document.getElementById('tag id').firstChild.data);
So, for example within the string of text would appear a tag like this:
12
My question is how would I use a…