Given
string = 'Stackoverflow is awesome. It answers all my questions';
string = 'Stackoverflow. Q and A site';
I can get everything before the full-stop with string.split('.')[0];
But I only want to do this if full-stop appears after certain number of characters else return everything before the full-stop.
I properly need a regular expression to do this but am not sure how.
There is no need for a regex.
You can just do this: