From e4fd688c783e1080e6864c1643f777bfe99cec29 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Wed, 4 Jul 2018 12:48:39 -0500 Subject: [PATCH] Split on ; token instead of trying to capture submatches. --- src/GUI/OptionsGroup/UI_Point.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GUI/OptionsGroup/UI_Point.cpp b/src/GUI/OptionsGroup/UI_Point.cpp index bfe846973..2dfdedf35 100644 --- a/src/GUI/OptionsGroup/UI_Point.cpp +++ b/src/GUI/OptionsGroup/UI_Point.cpp @@ -41,9 +41,9 @@ void UI_Point::_set_value(Slic3r::Pointf value) { void UI_Point::_set_value(std::string value) { /// parse the string into the two parts. - std::regex format_regex("([0-9.]+);([0-9.]+)"); - auto f_begin { std::sregex_iterator(value.begin(), value.end(), format_regex) }; - auto f_end { std::sregex_iterator() }; + std::regex format_regex(";"); + auto f_begin { std::sregex_token_iterator(value.begin(), value.end(), format_regex, -1) }; + auto f_end { std::sregex_token_iterator() }; if (f_begin != f_end) { auto iter = f_begin;