mirror of
https://github.com/BeamMP/BeamMP-Launcher.git
synced 2025-07-01 07:25:34 +00:00
Regex assert
Co-authored-by: SaltySnail <51403141+SaltySnail@users.noreply.github.com>
This commit is contained in:
parent
a5c02217fa
commit
9d44146224
@ -89,6 +89,7 @@ namespace Utils {
|
||||
result.append(input, lastPos, match.position() - lastPos);
|
||||
|
||||
std::wstring varName;
|
||||
assert(match.size() == 4 && "Input regex has incorrect amount of capturing groups");
|
||||
if (match[1].matched) varName = match[1].str(); // %VAR%
|
||||
else if (match[2].matched) varName = match[2].str(); // $VAR
|
||||
else if (match[3].matched) varName = match[3].str(); // ${VAR}
|
||||
|
Loading…
x
Reference in New Issue
Block a user