|
-
Jan 13th, 2012, 07:44 AM
#1
Thread Starter
Member
How to get the values from {}
hello Genius
how to get the values from "{}" as List(of string)
Code:
Private _data$ = "frameshape{r90}{r-10}{aAzZ}{textlayer}"
i mean want to split this values like below
Dim getdatas As New List(Of String)
getdatas(0) = "r90"
getdatas(1) = "r-10"
'''''
can anybody help me
Thanks...........
-
Jan 13th, 2012, 08:43 AM
#2
Re: How to get the values from {}
You could probably use a Regex as well but String.Split is an easy enough option.
Code:
Dim data = "frameshape{r90}{r-10}{aAzZ}{textlayer}"
Dim arr = data.Split({"{"c, "}"c}, StringSplitOptions.RemoveEmptyEntries)
For Each elem In arr
MessageBox.Show(elem)
Next
Note that that will include the "frameshape" too but you can easily enough ignore that.
-
Jan 13th, 2012, 06:05 PM
#3
PowerPoster
Re: How to get the values from {}
Answer: This seems like a C/C++/C#, type of command syntax!!
Question: Can I ask why are you working with C command syntaxus, in VB.NET???
I have a huge free products range, of computer software in which you can download using any kind of 64-Bit Web Browser. Also there is coming a Social Networking section that I am making on my Website...
|Ambra Productions Inc. | The Black Sun Society | The Black Shield | Ambra College | Church of the Black Sun | Ambra Productions Inc's Homepage | Boomtick Venues: Ambar Nightclub, Jack Rabbit Slim's, Villa Nightclub and Lucy's Love Shack | Pasta Ambra | Fish Feast Company | Wallet Wizard | Ambrose Liquor | Ambar Tavern | Ambra University | Ambra Cheese |
Do you wish to do unpaid work for me??? If so, the PM me on this Forum, and then we can get to work, programming for the future of computers go by the name of ThEiMp. This is my ghost writers name. Also my nickname, means that I am: The Imperial of the Technology Industry, so then to make it really short, I just then wrote: The Imp, which is where I get the nickname from...
-
Jan 13th, 2012, 06:48 PM
#4
Re: How to get the values from {}
here's how with regex:
vb Code:
Imports System.Text.RegularExpressions
Public Class Form1
Private _data$ = "frameshape{r90}{r-10}{aAzZ}{textlayer}"
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim getdatas As List(Of String) = New Regex("\{(.+?)\}").Matches(_data$).Cast(Of Match).Select(Function(m) m.Groups(1).Value).ToList
End Sub
End Class
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Feb 2nd, 2012, 01:27 AM
#5
Thread Starter
Member
Re: How to get the values from {}
wow...!!! thanks ...it's working fine sir........
JMC,Paul thanks for your great codes thank you so much.....
Can I ask why are you working with C command syntaxus, in VB.NET???
this is not c,c++ codes ...m getting this values from com component and then react for this values
sorry for late because of long vacations
-
Feb 2nd, 2012, 01:28 AM
#6
Thread Starter
Member
Re: How to get the values from {}
oops i can't rate your posts WHY ....???? JMC n Paul........
Tags for this Thread
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
|