This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.
For more information, see this announcement post . Click the X in the top right-corner of this box to dismiss this message.
Help for those learning Tcl or writing their own scripts.
NTHosts
Op
Posts: 100 Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:
Post
by NTHosts » Tue Jun 27, 2006 11:12 am
I have this regexp
Code: Select all
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 ?
Last edited by
NTHosts on Wed Jun 28, 2006 7:54 am, edited 1 time in total.
De Kus
Revered One
Posts: 1361 Joined: Sun Dec 15, 2002 11:41 am
Location: Germany
Post
by De Kus » Wed Jun 28, 2006 4:05 am
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...
NTHosts
Op
Posts: 100 Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:
Post
by NTHosts » Wed Jun 28, 2006 6:22 am
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 ?
metroid
Owner
Posts: 771 Joined: Wed Jun 16, 2004 2:46 am
Post
by metroid » Wed Jun 28, 2006 6:59 am
Code: Select all
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.
NTHosts
Op
Posts: 100 Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:
Post
by NTHosts » Wed Jun 28, 2006 7:07 am
Yep that worked perfect, thanks
:D:D