From 0486efa69c10b2dbf52795fb4e0bef80c62c0773 Mon Sep 17 00:00:00 2001 From: Tom Early Date: Sat, 13 Jun 2020 12:36:56 -0700 Subject: [PATCH] variable length degree digits --- Location.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Location.cpp b/Location.cpp index 50aee31..395ae27 100644 --- a/Location.cpp +++ b/Location.cpp @@ -26,8 +26,8 @@ CLocation::CLocation() { - crc = std::regex("^.*([0-9]{2})([0-9]{2}\\.[0-9]{2,})([NS])/([0-9]{3})([0-9]{2}\\.[0-9]{1,})([WE])\\[.*$", std::regex::extended); - rmc = std::regex("^.*,([0-9]{2})([0-9]{2}\\.[0-9]{2,}),([NS]),([0-9]{3})([0-9]{2}\\.[0-9]{1,}),([WE]),.*$", std::regex::extended); + crc = std::regex("^.*([0-9]{1,2})([0-9]{2}\\.[0-9]{1,})([NS])/([0-9]{1,3})([0-9]{2}\\.[0-9]{1,})([WE]).*$", std::regex::extended); + rmc = std::regex("^.*,([0-9]{1,2})([0-9]{2}\\.[0-9]{1,}),([NS]),([0-9]{1,3})([0-9]{2}\\.[0-9]{1,}),([WE]),.*$", std::regex::extended); } // returns true on success