tellytv / telly

An IPTV proxy
MIT License
750 stars 105 forks source link

How to escape special characters in regex filter? #273

Open mkanet opened 4 years ago

mkanet commented 4 years ago

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: \|"

mike-pt commented 11 months ago

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.