Post Reply 
More than one match/replace per filter?
Sep. 14, 2011, 12:53 AM (This post was last modified: Sep. 14, 2011 02:23 AM by JJoe.)
Post: #7
RE: More than one match/replace per filter?
(Sep. 13, 2011 09:37 PM)zoltan Wrote:  I know it means "AND" but it seems to be acting more as a conditional. "IF there's an a-z character, check the list" Is that true?

Exactly. If a-z, Then call list, Else fail.

(Sep. 13, 2011 09:37 PM)zoltan Wrote:  And should the list entry be
"eins(^[a-z]) $SET(\1=one)" ?

Should probably be "eins(^[a-z])$SET(\1=one)". Otherwise the space after "eins(^[a-z])" in the list will remove the space after "one" from the rendered text. Wink

I didn't test it. Sorry, yet again.

(Sep. 13, 2011 09:37 PM)zoltan Wrote:  I'm not sure what "(^(^[a-z]))" does differently or why it's superior to the above, since [a-z] didn't remove letters either. It seems to be nothing more than double negation, so why not just use "(\s|>)\2([a-z]$LST(Trans))"

Negation like (^this) does not consume.
"[a-z]$LST(Trans)" would consume a character before the list saw it. Wait maybe a typo. You probably meant "[a-z]&$LST(Trans)".

I don't know that "(^(^[a-z]))" is superior but it could be. I don't remember exactly how lists are handled. Testing is required.
Mostly, I mentioned it to be complete. It is a useful idea.

(Sep. 13, 2011 09:37 PM)zoltan Wrote:  words after parentheses are not matched

So
(\s|>|\(|\))\2([a-z]&$LST(Trans))
or
([\r\n >()])\2([a-z]&$LST(Trans))
?

(Sep. 13, 2011 09:37 PM)zoltan Wrote:  I thought zwei(^[a-z])\3 $SET(\1=two\3)
might preserve the space after the match, but it doesn't.

Variables capture consumable strings.
(^[a-z]) tests, it doesn't consume.
However, zwei(^([a-z])\3) might work.

HTH
Add Thank You Quote this message in a reply
Post Reply 


Messages In This Thread
RE: More than one match/replace per filter? - JJoe - Sep. 14, 2011 12:53 AM

Forum Jump: