[GNC] Import Bills & Invoices: how can I use e.g. \S in the custom regular expression for import?

Rob Laan rob.laan at chello.nl
Sat Dec 22 10:11:30 EST 2018


Hi John,

Well, I have to take it all back. Using \S etc.does work in this situation. The problem is only with matching the \xHH values.

I still don’t understand why it won’t match with the \xHH values, but I have some clues that I will look into.

I also tested the issue of the bug you referred too. I now understand that that is a different issue; non of the generic character types I tested worked there.

Regards,

Rob


> On 22 Dec 2018, at 05:42, John Ralls <jralls at ceridwen.us> wrote:
> 
> 
> 
>> On Dec 21, 2018, at 11:54 AM, Rob Laan <rob.laan at chello.nl <mailto:rob.laan at chello.nl>> wrote:
>> 
>> Hi,
>> 
>> In the function Import Bills & Invoices, there is the option to use a custom regular expression to match the import file to the GnuCash fields.
>> In that regular expression, I want to use regex generic character types (e.g. \S for non white space characters), and hex codes (\xHH).
>> 
>> But when I enter e.g. \S in the dialog box, it is converted to \\S in the resulting regular expression (checked that in the debugger), bungling up the matching process.
>> 
>> Is this a bug? Or is there some other way to enter \S, \xHH etc. in the custom regular expression?
>> 
>> Using GnuCash maint on macOS High Sierra.
> 
> Sounds like a variant on https://bugs.gnucash.org/show_bug.cgi?id=631876 <https://bugs.gnucash.org/show_bug.cgi?id=631876>.
> 
> Regards,
> John Ralls
> 



More information about the gnucash-user mailing list