题目位置: http://www.microsoft.com/technet/scriptcenter/funzone/games/games08/sdevent9.mspx
官方题解: http://www.microsoft.com/technet/scriptcenter/funzone/games/solutions08/sdsol09.mspx
题目就是删除字母, 数字, 空白字符以外其他所有字符. 首先读取文件, 利用-replace运算符, 删除不是A-Z, a-Z, 0-9和空格以外的其它字符.
${C
:/
Scripts
/
Symbols
.
txt}
-
replace
"
[^A-Za-z0-9 ]
"
本文介绍了一种使用 PowerShell 脚本的方法来清除文本文件中除字母、数字及空格外的所有字符。通过具体示例展示了如何利用 `-replace` 运算符实现这一目标。
955

被折叠的 条评论
为什么被折叠?



