Answer the question
In order to leave comments, you need to log in
How to get rid of eating a character?
There is a regular .
Need : find a dot after which there is a non - space character and replace the dot with a dot with a space .
Example : "Offer.Second offer" to "Offer.Second offer".
Problem : replaces a dot with a non-whitespace character with a dot with a space :
"Sentence. second sentence"
Question : how to write a regular expression so that it does not store the character being checked?
All code , just in case
Answer the question
In order to leave comments, you need to log in
echo(preg_replace('/(\.)(\S)/', '$1 $2', $s));
and even betterecho(preg_replace('/\s*(\.)(\S)/', '$1 $2', $s));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question