regex - Java: How to replace all occurances of a character if and only if followed by some other character -


Specifically: I want to change all the events of a full stop. A full stop plus white space \. With the \ S if the full stop is immediately followed by an upper case letter [A-Z].

Any suggestions? Thanks

  yourstring.replaceAll ("\\. ([AZ])", "$ 1 ")  

Comments