Post Reply 
Removing everything except Images and Links
Jun. 09, 2005, 09:25 PM
Post: #1
 
How can I write a filter that keeps only Images and Links but removes everything else?

I visit a game forums that posts screenshots and links to screenshots.

How can I do this? Eyes Closed Smile

Thanks

Test Code:

Code:
<td  bgcolor="FFFFFF"  valign="top" class="msg" width="100%" >I'm too lazy to cut out just the game images from these, so deal with it. here's Shining Force 1 and 2, two of the best tactical RPGs ever.
<br />

<br />
<img src="http://img121.exs.cx/img121/4641/sf1.jpg" border="0" />
<br />

<br />
<img src="http://img121.exs.cx/img121/8691/sf2.jpg" border="0" /><br /></td>
Visit this user's website
Add Thank You Quote this message in a reply
Jun. 10, 2005, 01:40 AM
Post: #2
 
Kye-U;
Quote:How can I write a filter that keeps only Images and Links but removes everything else?
This from the fella who wrote "Writing Proxomitron filters is fun!"? <_< [lol]

I'd have to guess that the requirements for such a filter should be generic, i.e., it should be able to work on any page, with no limits on how many links and/or images. Hence, to paraphrase Neal Stephenson, "This marine smells the distinct odor of a recursive filter coming into existance."

But I'm not gyrene enough to write it. [beatdown]


Oddysey

I'm no longer in the rat race - the rats won't have me!
Add Thank You Quote this message in a reply
Jun. 10, 2005, 02:24 AM
Post: #3
 
Trust me, I've played around quite a bit, trying to find a filter that does this.

I'm hoping Sidki would chime in on this Eyes Closed Smile
Visit this user's website
Add Thank You Quote this message in a reply
Jun. 10, 2005, 03:32 AM
Post: #4
 
Got it!

Code:
[Patterns]
Name = "TEST"
Active = TRUE
Limit = 512
Match = "*(<a\1</a>|<img\2>)\3"
Replace = "\3"
Visit this user's website
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: