Regular expressions in GnuCash

Derek Atkins warlord at MIT.EDU
Mon Sep 26 10:53:30 EDT 2016


David,

"David T. via gnucash-user" <gnucash-user at gnucash.org> writes:

> Peter,
>
> Thank you for your perspective on this; I agree on the “clunky”
> designation, but would take this a little further. While I appreciate
> everyone’s input on the possibilities of Regex syntax, I am dismayed
> at the prospects for the original poster, as well as the broader user
> base.
>
> Let me ask you all this: if I asked you to get in your car and drive
> to the store to pick up some milk and eggs, would you think it
> reasonable to have to read six online manuals, and then construct and
> test several different types of key in order to start your car? Or do
> you expect to get in your car, start it up and drive it off without
> much consideration at all? I believe that most drivers expect their
> cars to “just work” when they get in to go to the store.

You do everyone a disservice by proposing these hyperbolic comparisons.
I would more liken "starting a car to drive to the store for milk and
eggs" to be "starting the program and entering a few transactions.  IMHO
that part of GnuCash definitely "just works".

> Well, I would hope for the same kind of “It Just Works” functionality
> from my accounting program with regards to extracting basic
> information (such as information on a range of checks) from my
> accounting data.

For what is being asked here I would be more akin to asking "how to I
tune my radio to 5 selected radio stations and have it scan just those
five stations?".   Honestly, I would expect you'd have to read through
the owner's manual to figure that one out, assuming the car's radio
could even do that.

> My point is this: Yes, there are ways to use the tools provided to
> achieve the desired end—but are they easy to use and intuitive to a
> wide audience?

Like in life, some things are easy and some things are harder.  And some
things are easier for some and harder for others.  There's just no way
to make everything easy for everyone.

> Moreover, is it appropriate to expect every user to become familiar
> with an arcane (and yes, Regex IS arcane) mathematical code in order
> to find this kind of information?

Again, it depends on the kind of information.  I'd just do something
like:

  Date is after 1/1/2015  AND
  Amount is < 0           AND
  Number matches regex .


This would find everyhing that has an entry in the number column (I'm
fairly sure empty wouldn't match that regex), within the primary date
range and the value will be zero because in an asset a credit is a
negative amount.

> Finally, adopting the implied mindset that “These tools work, and
> users should adapt to them" runs counter to the very idea of
> improvement and innovation. I sincerely hope that we all can continue
> to seek better and easier ways of meeting user needs.

Patches always welcome, David  :)

> Best,
> David T.

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-user mailing list