telly icon indicating copy to clipboard operation
telly copied to clipboard

How to escape special characters in regex filter?

Open mkanet opened this issue 4 years ago • 1 comments

This is just a general question...

How do we search for the below string; including the pipe characters? I couldn't find any information about escaping special characters.

|USA| |MOVIES | Or, what if I want to search for both?

When I try something like below... Filter = "\|USA\| .* HD|\|USA\| .* UHD|\|US\| .* HD|\|US\| .* UHD|\|UK\| .* HD|\|UK\| .* UHD"

I get the error:

invalid escape sequence: \|"

mkanet avatar Jun 01 '20 06:06 mkanet

I know you posted this LONG ago, but I bumped into it today, you have to double escape

\\|USA i.e.

Decided to post just in case others bump into this too.

mike-pt avatar Jul 31 '23 20:07 mike-pt