Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QRegularExpression Reg("^\[ABC=\d+.?\d*\]\n$");
- if(line.contains(Reg))
- {
- curABC = line.mid(5,line.length()-7);
- }
- QRegularExpression rx("^\[ABC=(\d+.?\d*)\]\s*$");
- QRegularExpressionMatch match = rx.match (line);
- if (match.hasMatch ()) {
- curABC = match.captured (1);
- }
- #include <string_view>
- constexpr size_t prefix_len = ("ABC="sv).length();
- size_t prefix_len = sizeof("ABC=") - 1;
Add Comment
Please, Sign In to add comment