[GNC] Import Bills & Invoices: how can I use e.g. \S in the custom regular expression for import?
Adrien Monteleone
adrien.monteleone at lusfiber.net
Fri Dec 21 17:37:52 EST 2018
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 Dec 21, 2018, at 4:33 PM, Rob Laan <rob.laan at chello.nl> wrote:
>
> 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 \S to \\S in the resulting regular expression.
> So, instead of matching any non white space character (with \S), the regular expression tries to match a \ (the escaped \ in the expression) followed by an S; clearly not my intention.
>
> I don’t think it is intentional that the editor escapes my \, I suspect it is a bug. But I’ll see if anyone here can yet shed some light on this.
>
> Regards,
>
> Rob
>
>> On 21 Dec 2018, at 21:41, David Cousens <davidcousens at bigpond.com> wrote:
>>
>> 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
>> command character you have to precede it with another "\" , i.e "\\". The
>> expression editor is inserting the escape character automatically for you,
>>
>> David
>>
>>
>>
>> -----
>> David Cousens
>> --
>> Sent from: http://gnucash.1415818.n4.nabble.com/GnuCash-User-f1415819.html
>> _______________________________________________
>> gnucash-user mailing list
>> gnucash-user at gnucash.org
>> To update your subscription preferences or to unsubscribe:
>> https://lists.gnucash.org/mailman/listinfo/gnucash-user
>> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
>> -----
>> Please remember to CC this list on all your replies.
>> You can do this by using Reply-To-List or Reply-All.
>
> _______________________________________________
> gnucash-user mailing list
> gnucash-user at gnucash.org
> To update your subscription preferences or to unsubscribe:
> https://lists.gnucash.org/mailman/listinfo/gnucash-user
> If you are using Nabble or Gmane, please see https://wiki.gnucash.org/wiki/Mailing_Lists for more information.
> -----
> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.
More information about the gnucash-user
mailing list