Using regular expressions when reading a file
Alexander Zhirov
azhirov1991 at gmail.com
Thu May 5 18:50:17 UTC 2022
On Thursday, 5 May 2022 at 18:15:28 UTC, H. S. Teoh wrote:
> auto m = matchFirst(line, p_property);
Yes, it looks more attractive. Thanks! I just don't quite
understand how `matchFirst` works. I seem to have read the
[description](https://dlang.org/phobos/std_regex.html#Captures),
but I can't understand something.
And yet I have to manually remove the line break:
```sh
["host":"192.168.100.236\n", "dbname":"belpig\n",
"user":"postgres", "port":"5432\n"]
```
More information about the Digitalmars-d-learn
mailing list