forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Is this possible to parse?

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Sun Feb 23, 2003 7:41 am    Post subject: Is this possible to parse? Reply with quote

I'm wondering if it is possible to parse a chat site...
I use a norwegian chat site which is a html based system using CGI.
Is it possible to take everything between two lines like this:

<!-- Start of chat content -->

<!-- End of chat content -->

and then parse the data so that the usernames, times and chat contents are parsed and any html tags removed.

The output of the chat looks kinda like this:

GeoTrail 08:39 And here is what I have written on the chat.
Username 08:38 And here is what someone else wrote.
and so on.

Is this possible to do and then display the content in an object in VDS?

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Feb 23, 2003 8:04 am    Post subject: Reply with quote

Probably... Wink

We'll assume the whole string is in %%var...

I'd remove the html tags first, using @pos() and strdel() - there's
several threads in the source code sections on string removal and
replacement.

To get the name and time (providing spaces are NOT allowed in the
name), you can parse them:

OPTION FIELDSEP, " "
PARSE "%%name;%%time", %%var

Then use @substr (or @strdel) to get the text (add 2 to length
for the spaces after name and time):

%%start = @sum(@len(%%name), @len(%%time), 2)
%%var = @substr(%%var, %%start, @len(%%var))

%%var should now contain only the chat text.

Maybe this'll get ya started anyway. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Sun Feb 23, 2003 2:38 pm    Post subject: Reply with quote

Thanks Mac Smile
I'll give that a try. Before sure to await another stupid question here in a short time Laughing

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Sun Feb 23, 2003 3:54 pm    Post subject: Reply with quote

For those who are trying and or willing to learm, there is no such thing as
a stupid question.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Sun Feb 23, 2003 4:11 pm    Post subject: Reply with quote

Well, I'm willing, able and ready to learn Wink
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group