The Un-Official Proxomitron Forum
Removing everything except Images and Links - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Proxomitron Filters (/forumdisplay.php?fid=38)
+--- Forum: Filter Help/Request (/forumdisplay.php?fid=31)
+--- Thread: Removing everything except Images and Links (/showthread.php?tid=486)



- Kye-U - Jun. 09, 2005 09:25 PM

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>



- Oddysey - Jun. 10, 2005 01:40 AM

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


- Kye-U - Jun. 10, 2005 02:24 AM

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


- Kye-U - Jun. 10, 2005 03:32 AM

Got it!

Code:
[Patterns]
Name = "TEST"
Active = TRUE
Limit = 512
Match = "*(<a\1</a>|<img\2>)\3"
Replace = "\3"