| 28 | } |
| 29 | |
| 30 | inline ProfileLoadCommand parseProfileLoadCommand(const QString& command) |
| 31 | { |
| 32 | static const QRegularExpression re( |
| 33 | QStringLiteral("^\\s*profile\\s+(global|tx|mic)\\s+load\\s+\"([^\"]*)\"\\s*$"), |
| 34 | QRegularExpression::CaseInsensitiveOption); |
| 35 | const QRegularExpressionMatch match = re.match(command); |
| 36 | if (!match.hasMatch()) { |
| 37 | return {}; |
| 38 | } |
| 39 | |
| 40 | return { |
| 41 | true, |
| 42 | match.captured(1).toLower(), |
| 43 | match.captured(2), |
| 44 | }; |
| 45 | } |
| 46 | |
| 47 | } // namespace AetherSDR |