Simple text sentence splitting and counting. Supports atleast english, german and dutch, possibly more. If you find it works well enough for your language, please let me know!
Instead of trying to trim the string from both ends, keeping the middle intact by referencing it, this applies two operations on the left and right separately.
Since both regexes are anchored and no references have to be kept it shouldn't be any slower than before and I suspect it might even be faster (though I have not benchmarked it).
It is more robust for sure and passes my (limited) test case.
Instead of trying to trim the string from both ends, keeping the middle intact by referencing it, this applies two operations on the left and right separately.
Since both regexes are anchored and no references have to be kept it shouldn't be any slower than before and I suspect it might even be faster (though I have not benchmarked it).
It is more robust for sure and passes my (limited) test case.