relevanssi_default_punctuation_replacement

apply_filters( 'relevanssi_default_punctuation_replacement', string $replacement )

Filters the replacement for all punctuation that remains after specific punctuation handling is done.

Parameters

$replacement
(string) The replacement value for punctuation, in practise an empty string or a space. The default value is space.

More information

The way Relevanssi handles punctuation by default is a list of replacements made based on Relevanssi settings and default values. These can be modified with the relevanssi_punctuation_filter hook.

Then the rest of the punctuation (anything that the regex [:punct:] catches) is replaced with the value this filter hook is applied to, by default a space. The space is generally a reasonable default value, in some cases, it may be helpful to replace it with an empty string.

add_filter( 'relevanssi_default_punctuation_replacement', '__return_empty_string' );