Regular expressions in GnuCash

Mike or Penny Novack mpnovack at mtdata.com
Sat Sep 24 08:20:54 EDT 2016


On 9/23/2016 1:12 AM, Dean Gibson wrote:
> To select everything from "1234" to "5678" (extended regular 
> expressions):
We are getting a little far afield here, but speaking as a retired pro, 
the easiest way to attack a problem like this (to analyze that your 
result WILL be as required -- ie  "correctness of solution") is to break 
the problem up into smaller parts. You don't have to do the selection in 
one step. The results of one grep can be fed to another, narrowing down 
the result set until exactly what is required. For example:

just with four digit numbers => first digit >0 and <6 => second digit >1 
and <7 = third digit >2 and <8 => fourth digit >3 and <9

Each of those five regex's will be MUCH simpler and easier to confirm 
correctness than a regex to do the whole thing at once.

Michael D Novack


More information about the gnucash-user mailing list