I am masking all characters between single quotes (inclusively) within a string using `preg_replace_callback()`. But I would like to only use `preg_replace()` if possible, but haven't been able to figure it out. Any help would be appreciated.

This is what I have using `preg_replace_callback()` which produces the correct output:

```
function maskCallback( $matches ) {
    return str_repeat( '-', strlen( $matches[0] ) );
}
function maskString( $str ) {
    return preg_replace_callback( "('.*?')", 'maskCallback', $str );
}

$str = "TEST 'replace''me' ok 'me too'";
echo $str,"\n";
echo $maskString( $str ),"\n";

```

Output is:

```
TEST 'replace''me' ok 'me too'
TEST ------------- ok --------

```

I have tried using:

```
preg_replace( "/('.*?')/", '-', $str );

```

but the dashes get consumed, e.g.:

```
TEST -- ok -

```

Everything else I have tried doesn't work either. (I'm obviously not a regex expert.) Is this possible to do? If so, how?