Ok, here is the issue.

I have a xyz.css file which I read using the streamreader.

the file has text in the form

.Addfont { ......
.GridLayout {......
a.Master Layout {......

Now I need to extract the text between the '.' and '{'
In this case it would be
Addfont
GridLayout
Master Layout

How should I go about this.... I tried using the readline() method but it didn't work for the '{'

Please help me

Thank you

Have you tried just reading in the lines and splitting based on the "." and "{"?

Dim streamRead as StreamReader = new StreamReader("xyz.css")
Dim input As String = streamRead.ReadLine()
Dim splitParams as String() = {".", "{"}
Dim cssClass as String
If input.StartsWith(".") Then
   cssClass = input.Split(splitParams, StringSplitOptions.RemoveEmptyEntries)(0).Trim()
Else
   cssClass = input.Split(splitParams, StringSplitOptions.RemoveEmptyEntries)(1).Trim()
End If

In my limited testing, that seems to give me what you were looking for.

commented: Excellent +10

Thanks Man ...worked like a charm.
bless you

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.