Regular expressions in GnuCash

Dean Gibson gnucash.stuff at mailpen.com
Sun Sep 25 12:55:11 EDT 2016


Actually, the problem is that regex expressions do not have (despite the 
appearance of ranges being similar) a comparison facility. Otherwise, a 
simple string compare would be a tremendous help (and satisfactory in 
most cases).

Regex ranges have a similarity to comparisons only in the single 
character case, which as we all agree is not much help unless one is a 
regex wizard.  I  work with them all the time, and so it would be no big 
deal, but the average person would probably rather commit suicide than 
try to devise them on a regular (pun intended) basis. Which was the 
point of my original regex post.

Most of us agree that, in almost all respects, storing the GnuCash data 
in a compressed XML is a better solution than using the SQL backend.  
The "almost all respects" has the obvious exception that SQL queries 
(integrated into a new "GnuCash2" -- grin) provide powerful selection 
expressions (eg, substringing and full comparison operators) that would 
easily solve the users problem.

Unfortunately, "easily" in no way describes the amount of work required 
in GnuCash to get there.

On 2016-09-25 06:48, Mike or Penny Novack wrote:
> ....
>
> As a string processing problem, I was trying to show that there were 
> two parts, most easily divided up. First to find/identify just what 
> needed to be compared/range checked and then the compare/range check 
> itself (and my mistake was not seeing that a SIMPLE collating sequence 
> check was enough once determined to be four digits << but that latter 
> being a consequence of the collating sequence of almost all display 
> character sets (the representation of the digits is contiguous and in 
> the same order as their numeric value --- offhand I do not know of any 
> display set that does not have this property) >>



More information about the gnucash-user mailing list