Help with RegEx

N

nyiaj_vaj

I am not a RegEx guru so any help would be appreciated. The problem
deals with the display of text. The requirements are to ONLY display
the first two sentences in a given abstract. There is also no
guarantee that two sentences will exist, but it can't be more than two
sentences. The pattern /[?!.]/ is not sufficient because sentences can
end in other forms such as a quotation or that a "." may be part of a
name "Mr. Brown" which could be in a middle of a sentence. What would
be ideal would be to have an expression which takes into account
sentences which end in

?
!
..

or quotations

?"
!"
.."

and look for a space " " followed by maybe an uppercase letter denoting
the start of a new sentence would be optimal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top