I need a RegExp pattern, but i don't know how to write one?
I want to find all sections in an inifile.
Strings like those:
[5636]
[2246]
[1264]
thx.
Printable View
I need a RegExp pattern, but i don't know how to write one?
I want to find all sections in an inifile.
Strings like those:
[5636]
[2246]
[1264]
thx.
try this:
VB.Net Code:
'regex with capture group: (\d*) Dim srgx As New Regex("\[(\d*)\]") 'text you need to parse Dim tmpstring As String = "caddf 2133 [5636] aaaa [3231] bb 3242 314365426 [331]" 'Find Capture Group in: Dim matchG As MatchCollection = srgx.Matches(tmpstring) MsgBox(matchG(0).Groups(1).ToString()) 'in this case it will return the first found group: 5636
thx man! You're the best! +rep