The input is this:
*Word. Word.* Word word. *…*
"…" Word word. "…"
"…" word. "…"
The following is matching the empty space on the right side of a sentence.
(?<=["*]*[A-Z].+?\.["*]*)\s
If I want to match the empty space on the left side, I have to do this:
\s(?=["*]*[A-Z].+?\.["*]*)
The output should be this (the [] symbolize the matches):
*Word.[]Word.*[]Word word.[]*…*
"…"[]Woad word.[]"…"
"…" word.[]"…"
How to modify this regex so it matches the empty spaces on both sides of a sentence at the same time?