I'm working with texts that, in some cases, have extra spaces within words. For example:
Marshawn Lynch is amazing. A M A Z I N G!
I want to collapse the "A M A Z I N G" part into one word, so that the final result looks like:
Marshawn Lynch is amazing. AMAZING!
I'm working with PHP, and I'm trying to figure out a way to use preg_replace (maybe there's a better way of doing it?), but I can't figure out where to start.
That's a B movie.to getThat's aB movie.or evenThat'saB movie.So, what are you really trying to do? And what have you tried?(?<=[A-Z])(\s)(?=[A-Z])