| View previous topic :: View next topic |
| Author |
Message |
NTHosts Op
Joined: 10 Oct 2005 Posts: 100 Location: UK
|
Posted: Tue Jun 27, 2006 11:12 am Post subject: regexp help please [SOLVED] |
|
|
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 |
|
 |
De Kus Revered One

Joined: 15 Dec 2002 Posts: 1361 Location: Germany
|
Posted: Wed Jun 28, 2006 4:05 am Post subject: |
|
|
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 |
|
 |
NTHosts Op
Joined: 10 Oct 2005 Posts: 100 Location: UK
|
Posted: Wed Jun 28, 2006 6:22 am Post subject: but... |
|
|
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 |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Wed Jun 28, 2006 6:59 am Post subject: |
|
|
| 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 |
|
 |
NTHosts Op
Joined: 10 Oct 2005 Posts: 100 Location: UK
|
Posted: Wed Jun 28, 2006 7:07 am Post subject: wewt |
|
|
Yep that worked perfect, thanks    _________________ www.NT-Hosts.Net - More than just a host |
|
| Back to top |
|
 |
|