mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-01-19 06:53:26 +08: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:
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)
|
||||
|
Loading…
Reference in New Issue
Block a user