[PTRun][Calc]Improve handling of non-base 10 numbers (#36700)

This commit is contained in:
PesBandi
2025-01-08 11:49:26 +01:00
committed by GitHub
parent 308c4b817e
commit cd2a88704d
4 changed files with 9 additions and 4 deletions

View File

@@ -21,7 +21,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
@"pi|" +
@"==|~=|&&|\|\||" +
@"((-?(\d+(\.\d*)?)|-?(\.\d+))[Ee](-?\d+))|" + /* expression from CheckScientificNotation between parenthesis */
@"e|[0-9]|0x[0-9a-fA-F]+|0b[01]+|[\+\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
@"e|[0-9]|0[xX][0-9a-fA-F]+|0[bB][01]+|0[oO][0-7]+|[\+\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
@")+$",
RegexOptions.Compiled);