function GetridSpace(s: string): string;
var
 i                  : integer;
 strTemp            : string;
begin
  strTemp:='';
  for i:= 1 to length(s) do
    if s[i]<>'/' then strTemp:=strTemp+s[i];
  result:=strTemp;
end;
这个可以吧!呵呵 

解决方案 »

  1.   

    For i = 0 To UBound(a)
       b(i) = Split(a(i), "/")
       Print a(i)
    Next
    当改成这样就可以了.但是.没有我要的那样.比如.aaa,44,dd,就是分别显示.
    怎么办?
      

  2.   

    我写那个不行吗?改成VB不就OK了!
      

  3.   

    Dim a()
    Dim b()Dim strProcess() As String  '********Dim i As IntegerSQL = "select xxx from tablename"rs.Open SQL, conn, 3, 1
    ReDim a(rs.RecordCount - 1)
    ReDim b(rs.RecordCount - 1, 2)i = 0While rs.EOF
    a(i) = rs(0)
    i = i + 1
    rs.MoveNext
    WendFor i = 0 To UBound(a)
        ReDim strProcess(0)   '********
        strProcess = Split(a(i), "/") '********
        
        ReDim Preserve a(UBound(a) + UBound(strProcess) + 1) '********
        '在这里把strProcess数组的内容放到a里
        '在以后就用For循环来遍历a就行了
    NextFor i = 0 To UBound(a)
    For j = 0 To 2
    Debug.Print b(i, j),
    Next j
    Next i
      

  4.   

    For i = 0 To UBound(a)
         ReDim strProcess(0)  '********
         strProcess = Split(a(i), "/") '********
        
        ReDim Preserve a(UBound(a) + UBound(strProcess) + 1) '********
         a(i) = strProcess(i)  '是不是这样?
    '   b(i) = Split(a(i), "/")
    '   Print a(i)
    Next
      

  5.   

    Dim a()
    Dim b()
    Dim i As Integer
    Dim j As Integer
    Dim sql
    Dim strProcess() As StringDim lngIndexOld As Long
    Dim lngIndexNew As Long
    Dim lngK As LongSet rs = New ADODB.Recordset
    sql = "select num from table1"
    rs.Open sql, cn, adOpenDynamic, adLockOptimisticReDim a(rs.RecordCount - 1)
    ReDim b(rs.RecordCount - 1, 2)i = 0    
    Do While Not rs.EOF
    a(i) = rs(0)
    i = i + 1
    rs.MoveNext
    LoopDim kk As Integer
    kk = rs.RecordCount
    For i = 0 To kk - 1
    Print a(i)
    NextReDim strProcess(rs.RecordCount - 1)Print UBound(a)For i = 0 To UBound(a)
         strProcess = Split(a(i), "/")
    Next   For j = 0 To UBound(strProcess)
          Print strProcess(j)
       Next j
    我这样做.结果只有一条记录被分割开了.
    例如: -----------aaa/99i/99
          -----------dkdfjd/99i
          -----------kuisduf
          -----------kiu/9hy
          结果只有 kiu/9hy被分割了成为   kiu
                                         9hy
    谁知道是怎么回事?
      

  6.   

    用正则表达式(RegExp)试试用法看MSDN!