mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 11:48:06 +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*\(|" +
|
@"sinh\s*\(|cosh\s*\(|tanh\s*\(|arsinh\s*\(|arcosh\s*\(|artanh\s*\(|" +
|
||||||
@"pi|" +
|
@"pi|" +
|
||||||
@"==|~=|&&|\|\||" +
|
@"==|~=|&&|\|\||" +
|
||||||
@"e|[0-9]|[\+\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
|
@"e|[0-9]|0x[0-9a-fA-F]+|0b[01]+|[\+\-\*\/\^\., ""]|[\(\)\|\!\[\]]" +
|
||||||
@")+$", RegexOptions.Compiled);
|
@")+$", RegexOptions.Compiled);
|
||||||
|
|
||||||
public static bool InputValid(string input)
|
public static bool InputValid(string input)
|
||||||
|
|||||||
Reference in New Issue
Block a user