Hope you are okay!
I'm trying to make a filter to find duplicate consecutive words in Productnames and only remove the surplus words.
'Flik Flak Watch watch KW239' should be 'Flik Flak watch KW239'
'Skagen skagen watch FL23H2' should be 'Skagen watch FL23H2'
I found a regexp
$string=preg_replace('/\b(\S+)(?:\s+\1\b)+/i', '$1', $string);
but I can't seem to find the right way to implement it.
A custom filter in filter.php would be great but I haven't succeeded in making one.
Hope you can help!