Ver Mensaje Individual
  #7 (permalink)  
Antiguo 04/08/2011, 09:42
Codymarc
 
Fecha de Ingreso: abril-2010
Mensajes: 82
Antigüedad: 14 años
Puntos: 2
Respuesta: Extraer parte de un string

Fijate si te sirve esto, yo pense que estabas en vb.net...

Dim Cad1 As String = "AE124S-07900-3000-L"

Dim Partes(3) As String
Dim Indice As Integer = 0

For Each Caracter In Cad1
If Caracter <> "-" Then
Partes(Indice) &= Caracter
Else
Indice += 1
End If

Next

MsgBox(Partes(0) & " " & Partes(1) & " " & Partes(2) & " " & Partes(3))