Removing text between X & Y

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
RavenStar
Forum Newbie
Posts: 1
Joined: Tue Oct 03, 2006 12:23 pm

Removing text between X & Y

Post by RavenStar »

Sorry i have just discovered this forum and im not sure if this is in the right place.


Anyways, i have text at the end of a file im trying to remove.

Im basically trying to remove everything from the start of

Code: Select all

>&nbsp;<BR>
<OL>
<BR><BR><CENTER><span class=big>Total registered :
till the end of the file.


Example of file;

Code: Select all

="_new">Zukurah (Cunning - Il San) "Knight"</a><IMG SRC="buttongreen.gif" WIDTH="13" HEIGHT="13" ALT="Active">&nbsp;<BR>
<OL>
<BR><BR><CENTER><span class=big>Total registered : 154 Total unregistered : 70</span></CENTER>
<BR><BR><CENTER><span class="big">Last updated : 
<script type="text/javascript" language="javascript1.2"><!--
var theDate = new Date(1159783576 * 1000);
dateString = theDate.toLocaleString();
document.write(dateString);
//--></script>
</span></CENTER>
<p align="center">&nbsp;</p>
<p align="center"><span class="big"><IMG SRC="/images/buttongreen.gif" WIDTH="13" HEIGHT="13" ALT="Active"> = Active player (Played in last 15 days)</span></p>
<p align="center"><span class="big"><IMG SRC="/images/buttonyellow.gif" WIDTH="13" HEIGHT="13" ALT="Inactive"> = Inactive player (15 to 30 days not on)</span></p>
<p align="center"><span class="big"><IMG SRC="/images/buttonred.gif" WIDTH="13" HEIGHT="13" ALT="Absent"> = Absent player (30+ days not on)</span></p>
<p align="center"><span class="big"><IMG SRC="/images/Notreg.gif" WIDTH="15" HEIGHT="12" ALT="Unregistered"> = Unregistered</span></p>
<p align="center">&nbsp;</p>
<p align="center"><span class="big"><font face="arial"  size="1">Copyright 2006 KRU Interactive, Inc. All rights reserved.</font></span></p>
</body>
</html>
How can i go about selecting everything starting from x till the end of the file and replace it with nothing?

Thanks in advanced.
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

moved to regex.
Post Reply