Re: find/replace ?
From: Uri Dor (tablul_at_newsgroups.nospam)
Date: 07/22/04
- Next message: kh: "Re: REPOST: Intellisense and SqlCommand.Parameters.Add(..)"
- Previous message: Stu Smith: "Re: REPOST: Intellisense and SqlCommand.Parameters.Add(..)"
- In reply to: Scott Hungarter: "find/replace ?"
- Next in thread: David Alexander: "Re: find/replace ?"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 22 Jul 2004 16:03:40 +0200
you can't in the IDE but in a .NET program you can, using multiline
regular expressions. e.g. (in C#)
string contents =
@"abc
def;
ghi";
Regex r = new Regex(@"(?m)(;\r\s+ghi)");
Match m = r.Match(contents);
foreach(Capture c in m.Captures)
{
Console.WriteLine(c);
}
note the (?m) at the beginning of the regex, which means mutliline
Scott Hungarter wrote:
> Hi folks,
> Can anyone tell me how to do a find/replace on a block of text containing carriage return(s)?
- Next message: kh: "Re: REPOST: Intellisense and SqlCommand.Parameters.Add(..)"
- Previous message: Stu Smith: "Re: REPOST: Intellisense and SqlCommand.Parameters.Add(..)"
- In reply to: Scott Hungarter: "find/replace ?"
- Next in thread: David Alexander: "Re: find/replace ?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|