powershell中的正则表达式是否有问题。在Linux上运行。 因此,例如。
PS> "Does this get found" | select-string -Pattern "^[A-Z ]*$"
Does this get found
但是在bash shell上
$ echo "Does this get found" | grep "^[A-Z ]*$"
$ echo "DOES THIS GET FOUND" | grep "^[A-Z ]*$"
DOES THIS GET FOUND
因此正则表达式的行为有所不同。这是Powershell中的错误吗?