|
More than one match/replace per filter?
|
|
Sep. 13, 2011, 04:00 AM
(This post was last modified: Sep. 13, 2011 12:20 PM by JJoe.)
Post: #3
|
|||
|
|||
|
RE: More than one match/replace per filter?
A quick bit more.
Example A Match "$LST(Trans)" Replace "\1" List entries "eins $SET(\1=one)" Problem with "A" is the list will be called every time the filter tests code and "eins" may change einstein to onetein. Example B Match "(\s|>)\2$LST(Trans)" Replace "\2\1" List entries "eins(^[a-z]) $SET(\1=one)" Calling the list after a match has been made would speed things up. (^[a-z]) looks for the end of the word. Example C Match "(\s|>)\2([a-z]&$LST(Trans))" Replace "\2\1" Calling the list only when it may match could be better still. ([a-z]&$LST(Trans)) should call the list after a letter is found. You could also use "(\s|>)\2(^(^[a-z]))$LST(Trans)". (^(^[a-z])) tests for but does not remove a letter, a-z. Problem with A-C is that all text may be matched, not just rendered text. How will you prevent matching in tags, scripts, and other 'hidden' text? HTH |
|||
|
« Next Oldest | Next Newest »
|
| Messages In This Thread |
|
More than one match/replace per filter? - zoltan - Sep. 13, 2011, 01:05 AM
RE: More than one match/replace per filter? - whenever - Sep. 13, 2011, 02:48 AM
RE: More than one match/replace per filter? - JJoe - Sep. 13, 2011 04:00 AM
RE: More than one match/replace per filter? - zoltan - Sep. 13, 2011, 08:26 AM
RE: More than one match/replace per filter? - JJoe - Sep. 13, 2011, 01:21 PM
RE: More than one match/replace per filter? - zoltan - Sep. 13, 2011, 09:37 PM
RE: More than one match/replace per filter? - JJoe - Sep. 14, 2011, 12:53 AM
RE: More than one match/replace per filter? - zoltan - Sep. 14, 2011, 07:41 AM
|

Search
Member List
Calendar
Help





![[-]](images/ONi/collapse.gif)