egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

regexp help please [SOLVED]

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
NTHosts
Op


Joined: 10 Oct 2005
Posts: 100
Location: UK

PostPosted: Tue Jun 27, 2006 11:12 am    Post subject: regexp help please [SOLVED] Reply with quote

I have this regexp

Code:

regexp { <td height="39" valign="top" id="description"><font color="white" face="verdana" size="2">(.*) - this txt changes </font></tr>} $topic1 - djnick


the problem I have is the bit that says 'this txt changes' does change often, so of course the regexp dosnt' work, how would I regsub (if thats right) that out ?
_________________
www.NT-Hosts.Net - More than just a host


Last edited by NTHosts on Wed Jun 28, 2006 7:54 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
De Kus
Revered One


Joined: 15 Dec 2002
Posts: 1361
Location: Germany

PostPosted: Wed Jun 28, 2006 4:05 am    Post subject: Reply with quote

you can use something like
[A-Za-z ]+?
to match the smallest text possible, but of any content.
_________________
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
Back to top
View user's profile Send private message MSN Messenger
NTHosts
Op


Joined: 10 Oct 2005
Posts: 100
Location: UK

PostPosted: Wed Jun 28, 2006 6:22 am    Post subject: but... Reply with quote

Would I add that to a regsub.. if so how would that look, or do I just add that to the regexp I have already ?
_________________
www.NT-Hosts.Net - More than just a host
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Wed Jun 28, 2006 6:59 am    Post subject: Reply with quote

Code:
regexp { <td height="39" valign="top" id="description"><font color="white" face="verdana" size="2">(.*) - .*</font></tr>} $topic1 - djnick


Maybe something like that? Assuming the - is the seperator.
Back to top
View user's profile Send private message
NTHosts
Op


Joined: 10 Oct 2005
Posts: 100
Location: UK

PostPosted: Wed Jun 28, 2006 7:07 am    Post subject: wewt Reply with quote

Yep that worked perfect, thanks Very HappyVery HappyVery Happy
_________________
www.NT-Hosts.Net - More than just a host
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
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


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber