How do I use regular expression to match the last character of a sentence?
Ältere Kommentare anzeigen
I want to use regular expression to match the last character of a sentence as ".", "!" or "?". A sentence that has any of these characters as the last character is to be copied into a file for further processing.
4 Kommentare
Jos (10584)
am 25 Feb. 2014
Are there other symbols that act as delimiter between sentences?
Jos (10584)
am 25 Feb. 2014
Ans how are these sentences stored? In a single char array with delimiters? May be you can give a short example?
Walter Roberson
am 25 Feb. 2014
English can be ambiguous about where sentences end, in that it uses "." for abbreviations as well as for ending the sentence.
"Sing, Mr. Prefect, sing Row Row Row, etc., and dance as you do."
The "." after "Mr." does not end the sentence, and neither does the "." after "etc" .
Adekunle Obasa
am 26 Feb. 2014
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Characters and Strings finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!