vb.net Code:
Public Sub SomeMethod()
Dim sqlStmt As String = "INSERT INTO `phpbb_posts` VALUES ('1', '1', '2', '2', '0', '127.0.0.1', '1247936276', '1', '0', '1', '1', '1', '1', '', 'Welcome to phpBB3', " & _
"0x5468697320697320616E206578616D706C6520706F737420696E20796F75722070687042423320696E7374616C6C6174696F6E2E2045766572797468696E6720736565" & _
"6D7320746F20626520776F726B696E672E20596F75206D61792064656C657465207468697320706F737420696620796F75206C696B6520616E6420636F6E74696E756520746" & _
"F2073657420757020796F757220626F6172642E20447572696E672074686520696E7374616C6C6174696F6E2070726F6365737320796F75722066697273742063617465676F727920616E6" & _
"420796F757220666972737420666F72756D206172652061737369676E656420616E20617070726F70726961746520736574206F66207065726D697373696F6E7320666F72207468652070726" & _
"5646566696E6564207573657267726F7570732061646D696E6973747261746F72732C20626F74732C20676C6F62616C206D6F64657261746F72732C206775657374732C20726567697374657265" & _
"6420757365727320616E64207265676973746572656420434F5050412075736572732E20496620796F7520616C736F2063686F6F736520746F2064656C65746520796F75722066697273742" & _
"063617465676F727920616E6420796F757220666972737420666F72756D2C20646F206E6F7420666F7267657420746F2061737369676E207065726D697373696F6E7320666F7220616C6C2074" & _
"68657365207573657267726F75707320666F7220616C6C206E65772063617465676F7269657320616E6420666F72756D7320796F75206372656174652E204974206973207265636F6D6D656E6" & _
"4656420746F2072656E616D6520796F75722066697273742063617465676F727920616E6420796F757220666972737420666F72756D20616E6420636F7079207065726D697373696F6E7320667" & _
"26F6D207468657365207768696C65206372656174696E67206E65772063617465676F7269657320616E6420666F72756D732E20486176652066756E21," & _
"'5dd683b17f641daf84c040bfefc58ce9', '0', '', '', '1', '0', '', '0', '0', '0');" & _
"INSERT INTO `phpbb_posts` VALUES ('2', '1', '2', '2', '0', '127.0.0.1', '1248013556', '1', '0', '1', '1', '1', '1', '', 'Re: Welcome to phpBB3', 0x496D2061207370616D7A6F72, '70f9aa741b6128418d7fc20b0617b94b', '0', '', '3ffof7xe', '1', '0', '', '0', '0', '0');"
MessageBox.Show(System.Text.RegularExpressions.Regex.Match(sqlStmt, "0x[A-Za-z\d]+").Value)
End Sub
'EDIT
'if you want to loop through you can do something like this
For Each m As System.Text.RegularExpressions.Match In System.Text.RegularExpressions.Regex.Matches(sqlStmt, "0x[A-Za-z\d]+")
MessageBox.Show(m.Value)
Next