Regular expressions in GnuCash

Adrien Monteleone adrien.monteleone at gmail.com
Sun Sep 25 15:11:46 EDT 2016


Changing ‘Num’ to a numeric type is not the way to go. You see, while it appears that ‘check numbers’ are numeric, they are not. You do not perform math with them. (you can, sometimes, but not always) They are labels identifying a particular check. They just are in a sequence using numerals. Technically, they don’t have to be in sequence and you can even jump around in sequences when you order checks with an account as long as that range hasn’t been used prior. As well, it is certainly possible to write a check out of sequence entirely, say, from a forgotten but unused book of checks completely out of sequence from others written during the same period.

> On Sep 25, 2016, at 11:00 AM, gnucash-user-request at gnucash.org wrote:
> 
> From: david.carlson.417 at gmail.com <mailto:david.carlson.417 at gmail.com> <david.carlson.417 at gmail.com <mailto:david.carlson.417 at gmail.com>>
> Subject: Re: Regular expressions in GnuCash
> Date: September 25, 2016 at 6:11:58 AM CDT
> To: jralls at ceridwen.us <mailto:jralls at ceridwen.us>, sunfish62 at yahoo.com <mailto:sunfish62 at yahoo.com>
> Cc: gnucash-user at lists.gnucash.org <mailto:gnucash-user at lists.gnucash.org>, cppljevans at suddenlink.net <mailto:cppljevans at suddenlink.net>, derek at ihtfp.com <mailto:derek at ihtfp.com>
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> Sent from my LG G Pad 7.0 LTE, an AT&T 4G LTE tablet
> 
> 
> 
> ------ Original message------From: John RallsDate: Sun, Sep 25, 2016 2:13 AMTo: David T.;Cc: gnucash-user at lists.gnucash.org <mailto:gnucash-user at lists.gnucash.org>;Larry Evans;Derek Atkins;Subject:Re: Regular expressions in GnuCash
>> On Sep 25, 2016, at 8:20 AM, David T. via gnucash-user  wrote:> > Derek,> > I know that the Number column isn’t stored as a number (although I don’t think it got raised in this particular thread before you did here); that is why I don’t plan to file an RFE, since it would entail a restructuring of the data format. Well, that, and the fact that this particular need is not one that I encounter in my own use of GnuCash.> > It is unfortunate that the field is set up as text rather than a numeric—but I understand the reasoning. It is too bad that this decision has made it so difficult for this use case.> The use-case was to list all of the checks a user wrote since 1 Jan 2015. It somehow drifted off to writing a regex to match a particular set of numbers. That's not necessary for the use case because one can search for "Date Posted is on or after 1 Jan 2015 and Number matches regex [0-9]+", assuming that the user marked only and all check transactions with numerics in t!
> he Number field. Since the original poster's eyes glazed over early on in the regex discussion no one really probed what his practices were.Regards,John Ralls_______________________________________________gnucash-user mailing listgnucash-user at gnucash.orghttps <mailto:listgnucash-user at gnucash.orghttps>://lists.gnucash.org/mailman/listinfo/gnucash-user-----Please remember to CC this list on all your replies.You can do this by using Reply-To-List or Reply-All.
> I think that the O P was specific that he wanted a report containing only a list of the checks written,not deposits or other transactions in that time window.  That could still be done with a combination of additional search criteria designed to exclude deposits interest credit card transactions journal adjustments and whatever else was present.  All those criteria would have to fit in the top level combination of any or all to be done in one pass.
> If the number field definition was changed to numeric only and another field was added to catch other uses liketransaction or split line type as used in investment transactions and partially covered in the new preference added in the 2.6 release, I Think this would be a better avenue to pursue.
> Sorry about the poor finger fumbling on this tablet.
> David C



More information about the gnucash-user mailing list