title: Replace a full stop period \\. with space \\. space
body: <p>I want to separate a full stop period if it looks like a full stop period.</p>
  
  <p>The first issue I have solved and that is:</p>
  
  <pre><code>// space period if followed by Capital letter having spaces before or not.
  original = original.replaceAll("\\.(\\s?[A-Z])", " . $1");
  </code></pre>
  
  <p>This will do the following situation perfectly:
  "Hello World. This is a Test of the SWAT Team.Here's another phrase. Both USA and EU as well as U.K have not commented it. <code>http://a.a.br</code>"</p>
  
  <p>And do : "Hello World . This is a Test of the SWAT Team . Here's another phrase . Both USA and EU as well as U.K have not commented it. <code>http://a.a.br</code>"</p>
  
  <p>Now, noticed that it separated the cases "Hello Word. This..." and "...SWAT Team.Here's". Also notice that it did not damage the URLs.</p>
  
  <p>However it did not fix "...commented it. <code>http://a.a.br</code>" which should be "...commented it . <code>http://a.a.br</code>" But the world it. is followed by a lowercase http."</p>
  
  <p>Now, I want it to separate the period like the other did if the word next has a space and a lowercase, or even a number provided that the period had a lower case letter before it.</p>
  
  <p>So the cases:</p>
  
  <p>1) "it. http" should be "it . http"
  2) "it. 12" should be "it . 12"</p>
  
  <p>Now this has to happen without damaging URLs or email addresses. Running the first rule "\.(\s?[A-Z])" will not damage email addresses and URLs.</p>
  
  <p>Also, the problem with rule number 1 "\.(\s?[A-Z])" is that if, instead of an optional space and a capital letter, what if there is a line break before the capital letter [A-Z]?</p>
  
  <p>So it it is "This sentence.\nThat sentence." It should result  "This sentence . \nThat sentence."</p>
  
  <p>How can I do it?</p>
  
  <p>Thank you!</p>