Revert "GH-636: Fix regex to handle commas at the end of config parser lines"

This reverts commit 05bb509789.
This commit is contained in:
Tim Wojtulewicz 2023-04-12 16:05:39 -07:00
parent 6ac72a31bf
commit a811722d72
3 changed files with 3 additions and 7 deletions

View file

@ -184,10 +184,8 @@ bool Config::DoUpdate()
std::regex re;
try
{
std::string re_str = Fmt(
"^([^[:blank:]]+)[[:blank:]]+([^[:blank:]](.*[^[:blank:]%c])?)?[[:blank:]%c]*$",
set_separator[0], set_separator[0]);
re.assign(re_str, std::regex::extended);
re.assign("^([^[:blank:]]+)[[:blank:]]+([^[:blank:]](.*[^[:blank:]])?)?[[:blank:]]*$",
std::regex::extended);
}
catch ( const std::regex_error& e )
{

View file

@ -23,8 +23,7 @@ XXXXXXXXXX.XXXXXX testsub 2607:f8b0:4001::/48 2607:f8b0:4002::/48 ../configfile
XXXXXXXXXX.XXXXXX testinterval 1.0 sec 1.0 min ../configfile
XXXXXXXXXX.XXXXXX testtime 0.0 XXXXXXXXXX.XXXXXX ../configfile
XXXXXXXXXX.XXXXXX test_set (empty) a,d,b,c,erdbeerschnitzel ../configfile
XXXXXXXXXX.XXXXXX test_set a,d,b,c,erdbeerschnitzel a,c,b ../configfile
XXXXXXXXXX.XXXXXX test_vector (empty) 1,2,3,4,5,6 ../configfile
XXXXXXXXXX.XXXXXX test_set a,c,b (empty) ../configfile
XXXXXXXXXX.XXXXXX test_set a,d,b,c,erdbeerschnitzel (empty) ../configfile
XXXXXXXXXX.XXXXXX test_set (empty) \x2d ../configfile
#close XXXX-XX-XX-XX-XX-XX

View file

@ -27,7 +27,6 @@ testsub [2607:f8b0:4002:801::]/48
testinterval 60
testtime 1507321987
test_set a,b,c,d,erdbeerschnitzel
test_set a,b,c,
test_vector 1,2,3,4,5,6
test_set
test_set -