Reputation: 4912
I need to check occurrences where I have put one whitespace after a full-stop, and replace it by 2 spaces. I have the Regex for it, but Atom seems to call in invalid.
(?<=\.|\") {1,}(?=[a-zA-Z])
Conditions:
The above regex works perfectly for my conditions however Atom is not able to validate it. I need to use it for existing files.
Upvotes: 1
Views: 168
Reputation: 627082
You may use
([."]) ([a-zA-Z])
and replace with $1 $2
. See the regex demo and a regex graph:
Details
([."])
- Group 1 (its value is referred to with $1
backreference from the replacement pattern): .
or "
- a space (use \s
to match any whitespace)([a-zA-Z])
- Group 2 ($2
): an ASCII letter.Upvotes: 1