Hi,
Thanks again for the help. It certainly solved the first issue.
I am still struggling with getting the roRegex to work properly for my needs. I am basing it on a piece that was previously used in PHP, so that may be the issue. I wanted to double check that it was not a possible bug. Because no matter how I approach it, I am still not receiving any results.
Here is the "string" I am loading in. I am certain the data is reaching the code, as this is a copy and paste from the actual
print statement:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0" />
<title>Untitled</title>
</head>
<body style="font-size:small;font-weight:normal;">
<div id="gb" class="body">
<form id="glf"
action=
"https://www.mysite.com/accounts/loginauth"
method="post"
>
<input type="hidden" name="atmpb"
value="665" />
<div align="left">
<font color="red">
</font>
</div>
</body>
</html>
Here is the code responsible for parsing the "string" returned from a AsyncGetToString call:
strResult = msg.GetString()
'printing the string result works just fine
print strResult
match_exp = "!<form.*?action=" + Chr(34) + "(.*?)" + Chr(34) + "!"
regex = CreateObject("roRegex", match_exp, "ims")
arr = regex.Match(strResult)
'always contains invalid at any position
print "ismatch->";arr[1]
The result is always "invalid", though it should be the value of the "action" attribute. This is the case for any other array slot as well.
Admittedly, I am not very well versed with regular expressions. But as mentioned, it does work in my exsisting PHP script.
Thanks in advance for any assistance.
Cheers.