OneDrive Client written in D

Dmitry Olshansky via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Sep 25 00:39:55 PDT 2015


On 24-Sep-2015 16:22, Suliman wrote:
> On Tuesday, 22 September 2015 at 20:43:32 UTC, skilion wrote:
>> I've been waiting for a good sync client for OneDrive (15 GB for
>> free!) on Linux, but Microsoft seems to have other plans...
>> So I've decided to write my own, using D. Take a look:
>>
>>   http://skilion.github.io/onedrive/
>
>
> What this string in config.d do?
>   auto r = regex("(?:^\\s*)(\\w+)(?:\\s*=\\s*\")(.*)(?:\"\\s*$)");
>
>

Removing anonymous groups and using raw-literal:

regex(`^\s*(\w+)\s*=\s*"(.*)"\s*$`)

Looks simpler I guess.

Though if key="value" is expected I'd suggest to use lazy .* - `"(.*?)"` 
to stop on first " if any.

-- 
Dmitry Olshansky


More information about the Digitalmars-d-announce mailing list