For a project to make communications clearer for a website, I have to pull the messages using regex (Why? Because the message is commented out. With normal document.getElement I can't reach the message. But with the Regex mentioned below i can.)
I am trying to get a value using this expression:
\s*<td width="61%"class="valorCampoSinTamFijoPeque">(.|\n)*?<\/td>
How i use this expression:
var pulledmessage = /\s*<td width="61%"class="valorCampoSinTamFijoPeque">(.|\n)*?<\/td>/.exec(htmlDoc);
The above expression gives me NULL when i console.log() it. My guess is that the htmlDoc format that i supply the regex is not working. I just have no clue how to make it so the value does get pulled.
What i use to parse HTML:
var html1 = httpGet(messages);
parser = new DOMParser();
htmlDoc = parser.parseFromString(html1,"text/html");
The result I want to get:
<td width="61%"class="valorCampoSinTamFijoPeque"><b>D.</b> De:
Information, Information.
Information, Information
Para: Information
CC: Information
Alot of text here ............
</td>
I edited the above value to remove personal information.
html1 contains a full HTML page with the information required.
