Question: I want to separate sentences by inserting a space between each period and letter but not between anything else like a dot and a bracket or a dot and a comma.

Consider this:

```none
This is a text.With some dots.Between words.(how lovely).

```

This probably has some solution in Perl or PHP but what I'm interested in is can it be done in a text editor that supports search/replace based on regexes? The problem is that it would match both the dot and the character and replace will completely obliterate both. In other words, is there a way to match "nothing" between those two characters?

Answer: 
Language is not indicated and i used PHP but expression is quite generic and can be reused in other environments:

```
<?php

$s = 'This is a text.With some dots.Between words.(how lovely).';
$r = '~(\w)(\.)(\w)~';

echo preg_replace($r, '$1 $3', $s);

```

this code results to following string output:

```
This is a text With some dots Between words.(how lovely).

```

1. (\w) matches exactly one alphanumeric character before dot
2. (.) matches dot
3. (\w) matches exactly one alphanumeric character after dot

first and third matches are refered in replacement string as $1 and $3
This segment of code solves your problem:

```
preg_replace('/([a-zA-Z]{1})\.([a-zA-Z]{1})/', '$1. $2', 'This is a text.With some dots.Between words.(how lovely).');

```

You should detect any character before and after dot and replace with blanco.