Adding new lines via regexp_filter

Hi,

I have some patterns in my content that I’d like to remove from it using regexp_filter. Currently I’m doing this

regexp_filter = \bmypattern\b => _

Since _ is not is my charset_table, everything works as expected. However, I consider this a dirty workaround, and would prefer to either replace mypattern with space or new line. How can I do that? (I know I can use the regex functions from MySQL but how can I do it with regexp_filter?)

# Syntax error:
regexp_filter = \bmypattern\b => \n

which was denied by Manticore due to invalid syntax and

# Not working as expected:
regexp_filter = \bmypattern\b => \\n

which did not work as expected.

Any help is highly appreciated!

Technically the regex is re2 library, so can its ‘hex’ escape sequence

Something like

regexp_filter = \bmypattern\b => \x0D

Although I dont see how that is any better then understore. As you say its going to get immidately processed as a seperator either way.

1 Like