0

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中的错误吗?

4

0 回答 0