I am trying to grab everything inside a tr using javascript expressions.
This is where i am at right now:
var data = /<tr bgcolor="#FFFFFF">([\s\S])/.exec(request.responseText);
I have found on google that [\s\S] means all characters and new lines, i hope this is correct.
request.responseText is where i get my data from.
This is the value it returns:
"<tr bgcolor="#FFFFFF">", ""
I am using regExr.com to make these expressions. I have searched around on google but the only awnsers i find are in normal javascript.
So to recap my question, i want to get the data between the <tr>
that has bgcolor="#FFFFFF"
in it until the following </tr>
into a variable so i can use it in a array that i will be making.
From here --> <tr bgcolor="#FFFFFF">
<td>random text</td>
<td>random text</td>
<td>random text</td>
<td>random text</td>
</tr> <-- until here
I hope my question is clear, its hard explaining something you dont know much about. First time using Javascript expressions.
Edit: This is going to be a chrome plugin, and has already been made using regex. So changing it is way out of my skill level. I got given this project as an intern.
So document.getelementbyID for example is not what i want. I have already used this in the past.