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 |
|
(Rate)
|
![]() |
Loading
(Rate)
Vimal KandasamyPosted Feb 13, 2009, 1:18 AM
Simply Read a line and store it in a string and extract the data..see the below example..
StreamReader x = new StreamReader("xyz.css");
String line = x.ReadLine();
int start = line.IndexOf('.');
int end = line.IndexOf('{');
String data = line.Substring(start+1, (end - start)-1);
Now String data has the value between '.' and '{'.. it may be
Addfont
GridLayout
Master Layout...
Try this [code is in C#.Net.]...