Re: Correction
- From: Jon Shemitz <jon@xxxxxxxxxxxxxxxxx>
- Date: Fri, 18 Aug 2006 16:30:34 -0700
Dave Sexton wrote:
string pattern =
@"(?<sentence>.*? ) # lazily match sentence so that '.' does not capture eos
(?<eos> (?<! /) # negative lookbehind for /
/)?$ # match single '/' at end of string or just end of string";
Almost - this matches "My Taylor is /" twice: once as it should, and
again on the empty string after the /. Those optional matches are
tricky!
--
..NET 2.0 for Delphi Programmers www.midnightbeach.com/.net
Delphi skills make .NET easy to learn In print, in stores.
.
- Follow-Ups:
- Re: Correction
- From: Jules
- Re: Correction
- References:
- Regex Help
- From: Jules
- Correction
- From: Jules
- Re: Correction
- From: Dave Sexton
- Regex Help
- Prev by Date: Problems using FileStream in a seperate AppDomain
- Next by Date: Re: Correction
- Previous by thread: Re: Correction
- Next by thread: Re: Correction
- Index(es):
Relevant Pages
|