Click here to Skip to main content
11,577,240 members (59,248 online)

Regular Expressions

 
GeneralRe: Rename File Name Help Pin
Bernhard Hiller6-Aug-12 20:24
memberBernhard Hiller6-Aug-12 20:24 
QuestionSwap two values based on pattern Pin
biop.codeproject2-Aug-12 17:19
memberbiop.codeproject2-Aug-12 17:19 
AnswerRe: Swap two values based on pattern Pin
Peter_in_27802-Aug-12 19:02
memberPeter_in_27802-Aug-12 19:02 
GeneralRe: Swap two values based on pattern Pin
biop.codeproject2-Aug-12 23:43
memberbiop.codeproject2-Aug-12 23:43 
GeneralRe: Swap two values based on pattern Pin
Peter_in_27803-Aug-12 0:08
memberPeter_in_27803-Aug-12 0:08 
GeneralRe: Swap two values based on pattern Pin
biop.codeproject5-Aug-12 16:09
memberbiop.codeproject5-Aug-12 16:09 
GeneralRe: Swap two values based on pattern Pin
biop.codeproject5-Aug-12 17:12
memberbiop.codeproject5-Aug-12 17:12 
GeneralRe: Swap two values based on pattern Pin
Peter_in_27805-Aug-12 17:59
memberPeter_in_27805-Aug-12 17:59 
QuestionRegEx Problem Pin
Kevin Marois19-Jun-12 12:12
memberKevin Marois19-Jun-12 12:12 
AnswerRe: RegEx Problem Pin
AspDotNetDev19-Jun-12 12:34
protectorAspDotNetDev19-Jun-12 12:34 
GeneralRe: RegEx Problem Pin
AspDotNetDev19-Jun-12 12:52
protectorAspDotNetDev19-Jun-12 12:52 
GeneralRe: RegEx Problem Pin
Kevin Marois19-Jun-12 13:02
memberKevin Marois19-Jun-12 13:02 
AnswerRe: RegEx Problem Pin
AspDotNetDev19-Jun-12 13:35
protectorAspDotNetDev19-Jun-12 13:35 
Questioncan someone tell me whats wrong with this expression? Pin
ChekGuy29-Apr-12 11:48
memberChekGuy29-Apr-12 11:48 
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?

modified 29-Apr-12 19:28pm.

AnswerRe: can someone tell me whats wrong with this expression? Pin
egenis29-Apr-12 19:22
memberegenis29-Apr-12 19:22 
AnswerRe: can someone tell me whats wrong with this expression? Pin
Peter_in_278029-Apr-12 19:46
memberPeter_in_278029-Apr-12 19:46 
QuestionEither start or not a "d" Pin
Bernhard Hiller6-Mar-12 0:50
memberBernhard Hiller6-Mar-12 0:50 
AnswerRe: Either start or not a "d" Pin
Bernhard Hiller6-Mar-12 2:02
memberBernhard Hiller6-Mar-12 2:02 
QuestionTrying to match non-quoted sections Pin
PIEBALDconsult24-Jan-12 4:30
memberPIEBALDconsult24-Jan-12 4:30 
AnswerRe: Trying to match non-quoted sections Pin
Andreas Gieriet7-Apr-12 4:33
memberAndreas Gieriet7-Apr-12 4:33 
GeneralRe: Trying to match non-quoted sections Pin
PIEBALDconsult7-Apr-12 9:17
memberPIEBALDconsult7-Apr-12 9:17 
GeneralRe: Trying to match non-quoted sections Pin
Andreas Gieriet7-Apr-12 11:04
memberAndreas Gieriet7-Apr-12 11:04 
GeneralRe: Trying to match non-quoted sections Pin
PIEBALDconsult9-Apr-12 18:03
memberPIEBALDconsult9-Apr-12 18:03 
GeneralRe: Trying to match non-quoted sections Pin
Andreas Gieriet10-Apr-12 9:59
memberAndreas Gieriet10-Apr-12 9:59 
GeneralRe: Trying to match non-quoted sections Pin
PIEBALDconsult11-Apr-12 3:10
memberPIEBALDconsult11-Apr-12 3:10 
GeneralRe: Trying to match non-quoted sections Pin
Andreas Gieriet11-Apr-12 13:11
memberAndreas Gieriet11-Apr-12 13:11 
GeneralRe: Trying to match non-quoted sections Pin
PIEBALDconsult11-Apr-12 14:45
memberPIEBALDconsult11-Apr-12 14:45 
GeneralRe: Trying to match non-quoted sections Pin
Andreas Gieriet11-Apr-12 21:52
memberAndreas Gieriet11-Apr-12 21:52 
GeneralRe: Trying to match non-quoted sections Pin
Luc Pattyn7-Apr-12 9:43
mvpLuc Pattyn7-Apr-12 9:43 
GeneralRe: Trying to match non-quoted sections Pin
Andreas Gieriet7-Apr-12 10:39
memberAndreas Gieriet7-Apr-12 10:39 
QuestionSomething I just learned, with IP addresses Pin
Timothy CIAN20-Jan-12 6:42
memberTimothy CIAN20-Jan-12 6:42 
AnswerRe: Something I just learned, with IP addresses Pin
Andreas Gieriet7-Apr-12 13:10
memberAndreas Gieriet7-Apr-12 13:10 
QuestionHow to regex this Pin
Jacek Gajek17-Jan-12 12:05
memberJacek Gajek17-Jan-12 12:05 
AnswerRe: How to regex this Pin
Peter_in_278017-Jan-12 12:37
memberPeter_in_278017-Jan-12 12:37 
GeneralRe: How to regex this Pin
Jacek Gajek17-Jan-12 12:55
memberJacek Gajek17-Jan-12 12:55 
AnswerRe: How to regex this Pin
Peter_in_278018-Jan-12 17:41
memberPeter_in_278018-Jan-12 17:41 
GeneralRe: How to regex this Pin
Jacek Gajek19-Jan-12 4:12
memberJacek Gajek19-Jan-12 4:12 
GeneralRe: How to regex this Pin
Jacek Gajek19-Jan-12 4:52
memberJacek Gajek19-Jan-12 4:52 
AnswerRe: How to regex this Pin
Andreas Gieriet7-Apr-12 11:17
memberAndreas Gieriet7-Apr-12 11:17 
GeneralRe: How to regex this Pin
Jacek Gajek7-Apr-12 13:11
memberJacek Gajek7-Apr-12 13:11 
QuestionCan anybody explain how this Regex works. Pin
fiaolle15-Nov-11 2:26
memberfiaolle15-Nov-11 2:26 
AnswerRe: Can anybody explain how this Regex works. Pin
PIEBALDconsult15-Nov-11 5:04
memberPIEBALDconsult15-Nov-11 5:04 
GeneralRe: Can anybody explain how this Regex works. Pin
fiaolle15-Nov-11 6:08
memberfiaolle15-Nov-11 6:08 
GeneralRe: Can anybody explain how this Regex works. Pin
PIEBALDconsult15-Nov-11 6:34
memberPIEBALDconsult15-Nov-11 6:34 
GeneralRe: Can anybody explain how this Regex works. Pin
fiaolle15-Nov-11 6:45
memberfiaolle15-Nov-11 6:45 
GeneralRe: Can anybody explain how this Regex works. Pin
PIEBALDconsult15-Nov-11 13:46
memberPIEBALDconsult15-Nov-11 13:46 
GeneralRe: Can anybody explain how this Regex works. Pin
Andreas Gieriet8-Apr-12 1:02
memberAndreas Gieriet8-Apr-12 1:02 
AnswerRe: Can anybody explain how this Regex works. Pin
Andreas Gieriet7-Apr-12 12:06
memberAndreas Gieriet7-Apr-12 12:06 
QuestionUrl rewriting rule Pin
Gaurav.goel20913-Sep-11 0:18
memberGaurav.goel20913-Sep-11 0:18 
AnswerRe: Url rewriting rule Pin
Shahriar Iqbal Chowdhury24-Sep-11 11:00
memberShahriar Iqbal Chowdhury24-Sep-11 11:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web03 | 2.8.150603.1 | Last Updated 2 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid