RegexDashEscapeRector

Escape - in some cases

-preg_match("#[\w-()]#", 'some text');
+preg_match("#[\w\-()]#", 'some text');

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Php73\Rector\FuncCall\RegexDashEscapeRector;

return RectorConfig::configure()
    ->withRules([
        RegexDashEscapeRector::class,
    ]);

Other rules in the PHP 7.3 set