Post Reply 
How to use $LST(Count) in Replace ?
Dec. 22, 2012, 10:55 AM
Post: #1
How to use $LST(Count) in Replace ?
Hi,

longtime user who got by modifying posted filters and creating simple website specific filters but now I have a question on how to use the counter filter.

I want to wrap PRE tags in a TABLE tag which would allow me to use javascript to copy specific "tables" to the clipboard. This simple filter works (improvements welcome of course)
Code:
Match = "<pre\1/pre>"
Replace = "<table border="0"><tr><td><pre\1/pre></td></tr></table>"
But there can be more as one PRE on a page I need a unique ID added to the table so I thought of adding a counter like table id=pre1, table id=pre2 etc but I have no clue on how to use the $LST(Count). If I simply do this
Code:
Match = "<pre\1/pre>"
Replace = "<table border="0" id=pre($TST(($GET(n)+)=$LST(Count)|*)$SET(n=$GET(i)))><tr><td><pre\1/pre></td></tr></table>"

I get ProxomiTron Application Error - Read Over=randomhugenumber msgboxes (which I will admit never had seen before)

Any guidance or tips would be appreciated.
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
How to use $LST(Count) in Replace ? - prxymouse - Dec. 22, 2012 10:55 AM
RE: How to use $LST(Count) in Replace ? - JJoe - Dec. 22, 2012, 10:54 PM
RE: How to use $LST(Count) in Replace ? - JJoe - Dec. 23, 2012, 05:26 PM

Forum Jump: