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.
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.