pretty new to regex. this is a great article.
can someone tell me whats wrong with my expression? I'm using this from C#. I'm getting the response from a blog in a malformed xml format. Need to extract entries out of it. In a simple format inpu is similar to the following.
string input = @"<entry><id>tag:myblog.com try</entry><entry><id>tag:myblog.com tryagain</entry><entry><id>tag:myblog.com hello </enty>";
I need to identify the number of entries, and then processing each of them.
Regex blogsRegEx = new Regex(@"<entry><id>tag:myblog.*</entry>");
MatchCollection blogEntries = blogsRegEx.Matches(input);
I always get just 1 entry. It matches the whole thing instead of matching multiple strings in the pattern <entry<id>tag:myblog....</entry>.
Can someone help what am I missing here? do i need to use subexpressions here?
can someone tell me whats wrong with my expression? I'm using this from C#. I'm getting the response from a blog in a malformed xml format. Need to extract entries out of it. In a simple format inpu is similar to the following.
string input = @"<entry><id>tag:myblog.com try</entry><entry><id>tag:myblog.com tryagain</entry><entry><id>tag:myblog.com hello </enty>";
I need to identify the number of entries, and then processing each of them.
Regex blogsRegEx = new Regex(@"<entry><id>tag:myblog.*</entry>");
MatchCollection blogEntries = blogsRegEx.Matches(input);
I always get just 1 entry. It matches the whole thing instead of matching multiple strings in the pattern <entry<id>tag:myblog....</entry>.
Can someone help what am I missing here? do i need to use subexpressions here?