sammy1983 Posted March 29, 2014 Share Posted March 29, 2014 Hi, Please look at the screenshot taken from the internal tool source code. I am trying to extract "Investments" from the below source code. <td align="LEFT">Investments </td> Below is my code: $sHTML = _IEDocReadHTML($oIE1) $array = StringRegExp($sHTML, '(?i)">(.*?)</(?i)td>', 3) For $a = 0 To UBound($array) - 1 $Date = $array[$a] MsgBox(0, "", $Date) Next but the above code extracts just "10021" and then "State Employees CU (NC) (Member View) - Investments" and then moves to the second row in the table without moving to the next element. It seems that because <td>... </td> is closed script is not moving to next element. Link to comment Share on other sites More sharing options...
mikell Posted March 29, 2014 Share Posted March 29, 2014 If the text is really the same than in the image then the code should work $str = '<td align="LEFT">Finance </td>' & @crlf & _ '<td align="LEFT">Investments </td>' & @crlf & _ '<td align="LEFT">7868 </td>' $array = StringRegExp($str, '(?i)">(.*?)</td>', 3) For $a = 0 To UBound($array) - 1 $Date = $array[$a] MsgBox(0, "", $Date) Next Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now