如何才能从一个。txt文件中只读出汉字,然后建一个新的。txt文件写入。而清除其他的字符,如#,¥%,数字,等,谢谢各位,有vb的源码吗?高分赠送。

解决方案 »

  1.   

    先将.txt文件中的内容读出来,然后分析,遇到#,¥%则去除,遇到汉字则保留,然后将分析后所得的字符串写入新的.txt文件中。
      

  2.   

    能不能给我一份?   [email protected]
      

  3.   

    odusseus(龙会飞吗?)   发给你了!
      

  4.   

    Private Function GetText(strRsc As String, strExclude As String) As String
         Dim pos As Integer
         Dim strDes As String
         Dim i As Integer
         Dim strChar As String * 1
         
         For i = 1 To Len(strRsc)
             strChar = Mid(strRsc, i, 1)
             If InStr(strExclude, strChar) = 0 Then
                 strDes = strDes & strChar
             End If
         Next
         
         GetText = strDes
    End Function'GetText Text1.Text,"@#$%^&*123"
      

  5.   

    同意一楼的看法
    VB代码计算器 3.7.4 欢迎下载试用下载地址:
    华军软件 http://www.onlinedown.net/soft/7545.htm