Q:

Getting a value from a javascript string

I have this string in javascript.
var X = "<tr><td>pro</td><td>intel</td><td>234</td></tr>"

How can I retrieve the value 234 to another variable from that string?

A:

You've heard the disclaimers about parsing html with regex, but if you want regex, with your input, you can use this pattern:
[^><]+(?=<\/td><\/tr>)

In JS:
var myregex = /[^><]+(?=<\/td><\/tr>)/;
var matchArray = myregex.exec(yourString);
if (matchArray != null) {
    thematch = matchArray[0];
} 

