diff --git a/src/CalcViewModel/Common/CopyPasteManager.cpp b/src/CalcViewModel/Common/CopyPasteManager.cpp index d123d780..9b024691 100644 --- a/src/CalcViewModel/Common/CopyPasteManager.cpp +++ b/src/CalcViewModel/Common/CopyPasteManager.cpp @@ -26,18 +26,18 @@ constexpr wstring_view c_validCharacterSet{ L"0123456789()+-*/.abcdefABCDEF" }; // as both wstring_view and wchar[] can not be concatenated // [\s\x85] means white-space characters static const wstring c_wspc = L"[\\s\\x85]*"; -static const auto c_wspcLParens = c_wspc + L"[(]*" + c_wspc; -static const auto c_wspcLParenSigned = c_wspc + L"([-+]?[(])*" + c_wspc; -static const auto c_wspcRParens = c_wspc + L"[)]*" + c_wspc; -static const auto c_signedDecFloat = L"[-+]?\\d*(\\d|[.])\\d*"; +static const wstring c_wspcLParens = c_wspc + L"[(]*" + c_wspc; +static const wstring c_wspcLParenSigned = c_wspc + L"([-+]?[(])*" + c_wspc; +static const wstring c_wspcRParens = c_wspc + L"[)]*" + c_wspc; +static const wstring c_signedDecFloat = L"[-+]?\\d*(\\d|[.])\\d*"; // Programmer Mode Integer patterns // Support digit separators ` (WinDbg/MASM), ' (C++), and _ (C# and other languages) -static constexpr auto c_hexProgrammerChars = L"([a-f]|[A-F]|\\d)+((_|'|`)([a-f]|[A-F]|\\d)+)*"; -static constexpr auto c_decProgrammerChars = L"\\d+((_|'|`)\\d+)*"; -static constexpr auto c_octProgrammerChars = L"[0-7]+((_|'|`)[0-7]+)*"; -static constexpr auto c_binProgrammerChars = L"[0-1]+((_|'|`)[0-1]+)*"; -static constexpr auto c_uIntSuffixes = L"[uU]?[lL]{0,2}"; +static const wstring c_hexProgrammerChars = L"([a-f]|[A-F]|\\d)+((_|'|`)([a-f]|[A-F]|\\d)+)*"; +static const wstring c_decProgrammerChars = L"\\d+((_|'|`)\\d+)*"; +static const wstring c_octProgrammerChars = L"[0-7]+((_|'|`)[0-7]+)*"; +static const wstring c_binProgrammerChars = L"[0-1]+((_|'|`)[0-1]+)*"; +static const wstring c_uIntSuffixes = L"[uU]?[lL]{0,2}"; // RegEx Patterns used by various modes static const array standardModePatterns =