regex in replacement matrix

Main discussion forum
Post Reply
hopalongrock
Sr. Member
Sr. Member
Posts: 289
Joined: Wed Sep 15, 2010 1:38 pm

regex in replacement matrix

Post by hopalongrock »

I created one for "x" as multiplication sign, as replace ([0-9]) X ([0-9]) with \1 x \2 , and it works well with "custom case" defaulting to "proper case", but only if I disable "use case". For example it results 21 x 435 without use case, but 21 X 435 with use case.
Would it possible to add a new setting to the replacement matrix item, to eliminate the "use case" conversion on the result.
Another solution could be some extension of the "Exceptions", allowing not only literals before ";" .
I think replacement matrix and "Exceptions" are similar, the latter is simpler but don't use case rules.

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: regex in replacement matrix

Post by jtclipper »

Case conversion comes after matrix execution.
I'm thinking about adding an extra option per matrix, to execute it before or after case.

hopalongrock
Sr. Member
Sr. Member
Posts: 289
Joined: Wed Sep 15, 2010 1:38 pm

Re: regex in replacement matrix

Post by hopalongrock »

jtclipper wrote:Case conversion comes after matrix execution.
Yes, that's the problem in this case.
jtclipper wrote:I'm thinking about adding an extra option per matrix, to execute it before or after case.
It would be great, thanks in advance.

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: regex in replacement matrix

Post by jtclipper »

Updated the beta.

hopalongrock
Sr. Member
Sr. Member
Posts: 289
Joined: Wed Sep 15, 2010 1:38 pm

Re: regex in replacement matrix

Post by hopalongrock »

Works fine !

However, when I try to add a second rule, I get " Invalid cell' at 1st, later "list index" errors, and can't save the rule.
Invalid cell.jpg
Invalid cell.jpg (35.71 KiB) Viewed 4503 times
List index.jpg
List index.jpg (32.94 KiB) Viewed 4503 times
Edit:
In effect,I am unable to add any new rule:
any new invalid.jpg
any new invalid.jpg (46.03 KiB) Viewed 4503 times

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: regex in replacement matrix

Post by jtclipper »

Thanks, fixed that
(There are some unfinished proper case changes in there)

hopalongrock
Sr. Member
Sr. Member
Posts: 289
Joined: Wed Sep 15, 2010 1:38 pm

Re: regex in replacement matrix

Post by hopalongrock »

Works fine with the new beta, thanks !

User avatar
jtclipper
Administrator
Administrator
Posts: 768
Joined: Tue Aug 10, 2010 12:04 pm

Re: regex in replacement matrix

Post by jtclipper »

Did another update yet, proper case option (comment field separators) should work ok.

hopalongrock
Sr. Member
Sr. Member
Posts: 289
Joined: Wed Sep 15, 2010 1:38 pm

Re: regex in replacement matrix

Post by hopalongrock »

jtclipper wrote:Did another update yet, proper case option (comment field separators) should work ok.
Sorry, I write the comments myself, and use "as is" with custom case for comments, so I don't know, what was the problem.

Post Reply