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

2018-12-22 Thread John Ralls
You might get some insight from the Description section of https://developer.gnome.org/glib/stable/glib-Perl-compatible-regular-expressions.html , in particular the bit about UTF8. Regards, John Ralls > On

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

2018-12-22 Thread Rob Laan
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

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

2018-12-21 Thread John Ralls
> On Dec 21, 2018, at 11:54 AM, Rob Laan 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

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

2018-12-21 Thread Adrien Monteleone
So it adds an ‘\’ escape to ‘\S’ but not to ’S’? — weird. Even if it was a bug or intentional to add an ‘\’, I’d think it would do it to all expressions as I can’t see any helpful purpose to adding it when you’ve already specified it. Did you file a bug report? Regards, Adrien > On Dec 21, 201

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

2018-12-21 Thread Rob Laan
Yes, I even tried that! But luckily no result; it would have been pretty weird if that had worked ;) > On 21 Dec 2018, at 23:37, Adrien Monteleone > wrote: > > Rob, > > Although it *shouldn’t* work right, did you happen to try just using ’S’ > without the leading ‘\’ and letting GC insert it

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

2018-12-21 Thread Adrien Monteleone
Rob, Although it *shouldn’t* work right, did you happen to try just using ’S’ without the leading ‘\’ and letting GC insert it? Is the result ‘\S’ as intended? Certainly, that would be a bug, but you might still get the result you want. (at least for that narrow case) Regards, Adrien > On De

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

2018-12-21 Thread Rob Laan
Hi David, Thanks. Yes, I know about escaping special characters in regex. But I do not want to escape anything. And I don’t want to search for a \. \S is a regular regex content, matching any non white space character (a so called generic character type); but the expression editor changes my \

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

2018-12-21 Thread David Cousens
Rob, The "\" in Regex expressions is used as an escape character for the characters that are used as commands in Regex expressions to denote that the character following it is not to be interpreted as a command but to be interpreted literally. Hence if you wish to search for a "\" which is a comm

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

2018-12-21 Thread Rob Laan
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