Search:
Namespaces
Discussions
.NET v1.1
Feedback
The first 3 sentences
Messages
Related Types
This message was discovered on
ASPFriends.com 'aspngregexp' list
.
rubric
=AC
I am trying to write a regular expression which extracts the first 3
sentences (that is, all the text up to the third full stop and/or
punctuation mark [!?]) from a text string.
Any tips?
Reply to this message...
Darren Neimke
Something like this:
^([.\w\W]*?[\.\!\?]){0,3}
...should be ok.
For example, when run over the following text:
Hello. How are you? I said "Hello"! Dont you even listen?
It should match:
Hello. How are you? I said "Hello".=20
Whereas, when run over this piece of text:
Hello. How are you? I said "
It should match:
Hello. How are you?=20
-----Original Message-----
From: rubric [mailto:
Click here to reveal e-mail address
]
Sent: Thursday, April 18, 2002 7:33 AM
To: aspngregexp
Subject: [aspngregexp] The first 3 sentences
=AC
I am trying to write a regular expression which extracts the first 3
sentences (that is, all the text up to the third full stop and/or
punctuation mark [!?]) from a text string.
Any tips?
| [aspngregexp] member
Click here to reveal e-mail address
=3D YOUR ID
|
http://www.asplists.com/asplists/aspngregexp.asp
=3D JOIN/QUIT
|
http://www.asplists.com/search
=3D SEARCH Archives
Reply to this message...
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com