替换
// ".\MatchText.class" --> ".\MatchText."
".\MatchText.class".Remove($className.Length - 5)
移除
// ".\MatchText.java" --> ".\MatchText.class"
".\MatchText.java".Replace("java", "class")
取子串
// ".\MatchText.java" --> "MatchText"
$fileName = ".\MatchText.java"
$fileName.Substring(2, $fileName.Length-7)