[GNC] How to create Report on Checking & Exclude one Entity ?

Adrien Monteleone adrien.monteleone at lusfiber.net
Mon Nov 11 09:40:30 EST 2019


John,

I don’t know of any in particular, and I couldn’t seem to find such info. I found some examples online of doing such a search with the following basic form:

^((?!badword).)*$

It is a negative look-around, not an actual negative search.

I tried it in GnuCash to no avail. I haven’t tested it otherwise to know if it works at all, but I’d think something implements it somewhere since there were several hits offering similar advice to such questions.

Regards,
Adrien


> On Nov 10, 2019 w46d314, at 6:06 PM, John Ralls <jralls at ceridwen.us> wrote:
> 
> Adrien,
> 
> What regex implementation do you know of that has negating patterns? None of the ones I know do.
> 
> The Transaction report uses Guile regex which just wraps whatever libc/msvcrt was used to compile it, generally POSIX Enhanced. It doesn't support negating patterns and doesn't have an option to find transactions that don't match the provided pattern. IIRC libc regexes also don't support UTF8 character classes though they'll match explicit UTF8 characters of the same normalization just because the bytes are the same.
> 
> The find dialog uses glib pcre (perl-compatible regular expressions) which are considerably more powerful than POSIX ones but also don't have negating patterns. However the Find dialog has a "doesn't match" setting. Other bits of GnuCash use boost::regexes, which understands perl regex syntax. We don't use the C++ standard library because it doesn't support UTF8.
> 
> Regards,
> John Ralls



More information about the gnucash-user mailing list