Regular expression problem
-
hi, I have a question about RE. Lets say I have this string:
Text
I get the "Text" by using this RE:MatchCollection m = Regex.Matches(wynik,@"\"">\s*(.+?)\s*");
I use MatchCollection beacuse I do it on a bigger file but for the ease of writing ths post I'm just an example of one line. Then on my collection I do a foreach and each Text is set as an Item Label in a dropDown list. But in the m regex I would also like to get the "comment" so then in my foreach loop I would be also able to assign it to the items Tag lets say. How can I achive this? -
hi, I have a question about RE. Lets say I have this string:
Text
I get the "Text" by using this RE:MatchCollection m = Regex.Matches(wynik,@"\"">\s*(.+?)\s*");
I use MatchCollection beacuse I do it on a bigger file but for the ease of writing ths post I'm just an example of one line. Then on my collection I do a foreach and each Text is set as an Item Label in a dropDown list. But in the m regex I would also like to get the "comment" so then in my foreach loop I would be also able to assign it to the items Tag lets say. How can I achive this?I recommend using an XmlDocument for working with XML.
-
I recommend using an XmlDocument for working with XML.