Can't figure out how to use contains filter (~)

Whenever I try to use the filter like this slug:~the-cashmere-guide
I keep getting an error with the message “Error parsing filter”
What am I doing wrong? Please help, thanks!

Never mind, I figured it out after writing this post
The slug needs to be put in single quotes like this slug:~‘the-cashmere-guide’