File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
include/ReadoutCard/ParameterTypes Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class SerialId
3131 public:
3232 // / Constructs a SerialId object using a string in the sssss[:e] format
3333 // / For example: "10241", "10241:1"
34- // / \param string String of format "^[ \t]*[0-9]{5} :?[0-1]?[ \t]*$"
34+ // / \param string String of format "^[ \t]*( [0-9]{3}|[0-9]{5}) :?[0-1]?[ \t]*$"
3535 SerialId (const std::string& string);
3636
3737 SerialId (int serial, int endpoint);
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ namespace
2727
2828bool parseSerialIdString (const std::string string, int & serial, int & endpoint)
2929{
30- std::regex expression (" ^[ \t ]*[0-9]{5} :?[0-1]?[ \t ]*$" );
30+ std::regex expression (" ^[ \t ]*( [0-9]{3}|[0-9]{5}) :?[0-1]?[ \t ]*$" );
3131 if (std::regex_search (string, expression)) {
3232 serial = stoi (string.substr (0 , string.find (' :' ))); // Will return the SerialId struct
3333 endpoint = stoi (string.substr (string.find (' :' ) + 1 ));
You can’t perform that action at this time.
0 commit comments