Re: Find a String in VB.NET
From: steve (a_at_b.com)
Date: 06/08/04
- Next message: John Howard: "Invalid cast on SQL to other server"
- Previous message: jcrouse: "Controlling Controls on another Form"
- In reply to: Cor Ligthert: "Re: Find a String in VB.NET"
- Next in thread: Cor Ligthert: "OT"
- Reply: Cor Ligthert: "OT"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 8 Jun 2004 11:28:28 -0500
i gave a split method example too...look in this thread. also, i'm not the
op. i gave two examples b/c of the vagueness in the description of what the
op is trying to acheive...one being a delimited string search returning
matches...the other treating the input as a cvs, tick (') encapsulted, comma
separated stream of data. hopefully, one of the two is exactly what's
needed...else, there is enough there for the op to work with.
thanks for your thoughts though.
post you later, cor.
steve
"Cor Ligthert" <notfirstname@planet.nl> wrote in message
news:OXlQ29VTEHA.3332@tk2msftngp13.phx.gbl...
| Hi Steve
|
| Have a look at the split method
|
|
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemstringclasssplittopic.asp
|
| That is in my opinion made for your problem
|
| I hope this helps?
|
| Cor
|
| "steve" <a@b.com> schreef in bericht
| news:10ca3sfsgsko595@corp.supernews.com...
| > dim criteria as string = "(frederico)|(FGB)"
| > dim pattern as string = "(^" & criteria & ",?)|(,?" & criterion &
| ",?)|(,?"
| > & criterion & "$)"
| > dim regExp as new regEx(pattern)
| > dim match as match
| > dim yourString as string =
| "000,federico,00,439827HGH,1233,FGB,0000,00,000"
| > for each match in regExp.Matches(yourString)
| > console.writeline(match.value)
| > next
| >
| > or something therebouts.
| >
| > hth,
| >
| > steve
| >
| >
| > "Federico G. Babelis" <federico@gazum.com> wrote in message
| > news:uCaeZEPTEHA.1768@TK2MSFTNGP10.phx.gbl...
| > | Hi,
| > |
| > | I need to extract a string from another string separated by "," like a
| > .csv
| > | file.
| > | for example I have this string:
| > |
| > | String1 = 000,federico,00,439827HGH,1233,FGB,0000,00,000
| > |
| > | and from that string i need to extract string "federico" and string
| "FGB"
| > | and separate then into another 2 strings:
| > |
| > | String2 = "federico"
| > | String3 = "FGB"
| > |
| > | How this could be done in Visual Basic .NET ????
| > |
| > | Thanks and best regards,
| > | Federico
| > |
| > |
| >
| >
|
|
- Next message: John Howard: "Invalid cast on SQL to other server"
- Previous message: jcrouse: "Controlling Controls on another Form"
- In reply to: Cor Ligthert: "Re: Find a String in VB.NET"
- Next in thread: Cor Ligthert: "OT"
- Reply: Cor Ligthert: "OT"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|