B
Bubbles
Hello.
New to ASP.NET and struggling on this one.
I have a text file with a bunch of text in it. Throughout the file
words followed by a ":" will appear. I need to pull every such string
out and then display all unique values.
I am able to read the file in, but am having trouble getting regex to
work. What regex and setting should I use?
And how would you recommend I build a the unique list of array items
from the full list?
.... pressuming the text data is already in yy.text - the below code is
NOT working and may have bugs. I know the regexp is not working.
dim ccnt as integer
dim gg as arraylist
gg = new arraylist
Dim regexp as Regex = New Regex("^(w+):$", RegexOptions.IgnoreCase )
Dim objMatch as Match
For Each objMatch in regexp.Matches(yy.text)
gg.add(ltrim(objMatch.ToString()))
ccnt = ccnt + 1
Next
gg.sort
response.write(gg.count)
dim xxx as integer
FOR xxx = 0 TO gg.count-1
response.write(gg(xxx))
response.write("<br>")
next xxx
end sub
New to ASP.NET and struggling on this one.
I have a text file with a bunch of text in it. Throughout the file
words followed by a ":" will appear. I need to pull every such string
out and then display all unique values.
I am able to read the file in, but am having trouble getting regex to
work. What regex and setting should I use?
And how would you recommend I build a the unique list of array items
from the full list?
.... pressuming the text data is already in yy.text - the below code is
NOT working and may have bugs. I know the regexp is not working.
dim ccnt as integer
dim gg as arraylist
gg = new arraylist
Dim regexp as Regex = New Regex("^(w+):$", RegexOptions.IgnoreCase )
Dim objMatch as Match
For Each objMatch in regexp.Matches(yy.text)
gg.add(ltrim(objMatch.ToString()))
ccnt = ccnt + 1
Next
gg.sort
response.write(gg.count)
dim xxx as integer
FOR xxx = 0 TO gg.count-1
response.write(gg(xxx))
response.write("<br>")
next xxx
end sub