|
-
Feb 25th, 2008, 12:21 PM
#1
Thread Starter
PowerPoster
[RESOLVED] How to Extract GUIDs out of a string?
I am in Vb.NET 2008.
I want to extract or split all the GUIDS out of a string like this:
"331|-1|2||True|0|False|6f85d48a-9219-4a9a-98bf-e6fb2319727c||False/-1|0|3||True|0|False|5f3d89d2-461c-47f8-ace7-4f8e2e37879f||False|"
Here is the code I have and it does not work.
Dim s() As String = Regex.Split("331|-1|2||True|0|False|6f85d48a-9219-4a9a-98bf-e6fb2319727c||False/-1|0|3||True|0|False|5f3d89d2-461c-47f8-ace7-4f8e2e37879f||False|".ToUpper , "^[A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}$")
Output desired:
6f85d48a-9219-4a9a-98bf-e6fb2319727c
5f3d89d2-461c-47f8-ace7-4f8e2e37879f
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|