[GNC] filtering in report

Andreas Hentze andreas.hentze at gmx.de
Wed Feb 9 16:38:56 EST 2022


Hi Geoff,

> I think that the logical complement of this is:
> (See https://en.wikipedia.org/wiki/De_Morgan%27s_laws)
>
> NOT Second-Last character is 'u' AND
> NOT Second-Last character is 'o'
>   OR
> NOT Last character is 'b' AND
> NOT Last character is 'r'
>
> Which, as a regular expression, is:
>
> ([^uo].)|(.[^br])$
>
> I think this should work, give it a try!

this does not work, becaus of the OR "|" this expression filters both to
the last character. Due to deMorgan I would need a NOT to the complete
expression. I played around, but find no working combination.

As the negotiation only works with one character, I will use the special
character "_" at the end of the name. This works for me, because I have
an association where I have only two groups of accounts: my main
accounts and some other groups. Another possibility ist to write some
account names in capital letters as regEx is case sensitive.

thanks a lot for your effort and even if this was not the solution, you
gave me the hint to the workaround.

best regards
Andy



More information about the gnucash-user mailing list