- preg_match: documentation ( source)
- print_r: documentation ( source)
- preg_quote: documentation ( source)
<?php
$pattern = '/\b' . preg_quote('Ro(M)') . '\b/ui';
$sample = 'Ro(M)';
echo (int)preg_match( $pattern, $sample, $matches).PHP_EOL;
print_r($matches);