mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 03:07:56 +01:00
Add support for hex/binary numbers to calculator (#14948)
This minor expression validation tweak allows hexadecimal and binary numbers to be entered into expressions.
This commit is contained in:
committed by
GitHub
parent
a612ba845e
commit
f5d2f86c23
@@ -18,7 +18,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator
|
||||
@"sinh\s*\(|cosh\s*\(|tanh\s*\(|arsinh\s*\(|arcosh\s*\(|artanh\s*\(|" +
|
||||
@"pi|" +
|
||||
@"==|~=|&&|\|\||" +
|
||||
@"e|[0-9]|[\+\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
|
||||
@"e|[0-9]|0x[0-9a-fA-F]+|0b[01]+|[\+\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
|
||||
@")+$", RegexOptions.Compiled);
|
||||
|
||||
public static bool InputValid(string input)
|
||||
|
||||
Reference in New Issue
Block a user