我有两个文件,每个文件有4000多个单词。我想在oreder中的每个单词之后添加一个符号,以便在正则表达式模式中使用它们。这是开头的(不是很多......):
Dim Positive_Words As String
Dim Negative_Words As String
Positive_Words = My.Computer.FileSystem.ReadAllText("C:\positive.txt")
Negative_Words = My.Computer.FileSystem.ReadAllText("C:\negative.txt")
For Each word As String In Positive_Words
'What i need to write here in order to add a symbol "|" after every word?
Next
问题:
答案 0 :(得分:0)
Dim Positive_Words As String
Dim Negative_Words As String
Positive_Words = My.Computer.FileSystem.ReadAllText("C:\positive.txt").Replace(" ", "|")
Negative_Words = My.Computer.FileSystem.ReadAllText("C:\negative.txt").Replace(" ", "|")