Re: Easy (?!) regular expression -- find line breaks
- From: "Peter Duniho" <NpOeStPeAdM@xxxxxxxxxxxxxxxx>
- Date: Wed, 13 Jun 2007 21:18:50 -0700
On Wed, 13 Jun 2007 20:55:10 -0700, Peter Duniho <NpOeStPeAdM@xxxxxxxxxxxxxxxx> wrote:
[...]
If I want to take a string and break it into individual lines based on a specific pattern ("\r\n" in this case, but I don't think it matters), I can easily write a loop that does this by scanning through the string accumulating characters and spitting out a new string each time it hits the "\r\n". But I figured Regex ought to be able to do the scanning for me, so that all I have to loop through are the matches.
And just to clarify...
Yes, I understand that I can just use String.Split() to do this. I'm talking about the more general question of the matching, and my little self-assigned homework exercise to try to learn how Regex works.
.
- References:
- Easy (?!) regular expression -- find line breaks
- From: Peter Duniho
- Easy (?!) regular expression -- find line breaks
- Prev by Date: Re: need reference on "when to rewrite"
- Next by Date: Re: enable/disable buttons based on ListView selection
- Previous by thread: Easy (?!) regular expression -- find line breaks
- Next by thread: Re: Easy (?!) regular expression -- find line breaks
- Index(es):