[Gambas-user] Parsing HTML with Split(). Is this a BUG??

birchy pokerbirch at ...1601...
Tue Nov 4 18:42:46 CET 2008


Hi, i'm new to Gambas following a full migration from Windows XP/VB6 to
Ubuntu 8.04/Gambas. I have used VB6 for around 6 years and am really loving
Gambas, however i have a small problem. I am working on a web app that
downloads the HTML source of a web page and then parses various information
from it. Correct me if i am wrong, but Gambas does not have an HTML parsing
library, so i am working on my own function. The problem i have is with the
Split() function:
---------------------------------------------------------------------------
DIM sa AS String[]
sa = Split("<td>this is a</td> split test ", "</td>")
---------------------------------------------------------------------------
This produces an array of 13 elements due to it splitting on each SINGLE
character rather than the specified string. I expected it to produce an
array of 2 strings: "<td>this is a" and " split test ".

The same question remains unanswered on 
http://www.nabble.com/How-to-split-a-string--to9047840.html#a9047840 THIS 
thread. At this stage, i am assuming that i'll need to write my own split
function using the InStr(), Mid$(), Left$(), Right$() functions??
-- 
View this message in context: http://www.nabble.com/Parsing-HTML-with-Split%28%29.-Is-this-a-BUG---tp20311394p20311394.html
Sent from the gambas-user mailing list archive at Nabble.com.





More information about the User mailing list