mirror of
https://github.com/abraunegg/onedrive
synced 2024-06-15 20:25:18 +02:00
regex simplified
This commit is contained in:
parent
7afae8fbb8
commit
b4aeda818a
|
@ -29,7 +29,7 @@ struct Config
|
|||
private void load(string filename)
|
||||
{
|
||||
auto file = File(filename, "r");
|
||||
auto r = regex("(?:^\\s*)(\\w+)(?:\\s*=\\s*\")(.*)(?:\"\\s*$)");
|
||||
auto r = regex(`^\s*(\w+)\s*=\s*"(.*)"\s*$`);
|
||||
foreach (line; file.byLine()) {
|
||||
auto c = line.matchFirst(r);
|
||||
if (!c.empty) {
|
||||
|
|
Loading…
Reference in a new issue