-
-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Request] - Regex Patterns for filtering #1175
Comments
so I think I may have come up with a solution to this, I am not very good at swift, or have an apple developer account but did test it locally and it seemed to work. Maybe some who is a bit better can take it an polish it a bit. I made the following function
then used it like this as an example
I have attached the whole modified file PostFilter.swift this was only done for Slide For Reddit so it may need to be applied to the other projects, applied for title, htmlBody, flairs |
Good stuff, thank you for the detailed post and code! I abstracted the logic out a little bit so that the function could be used elsewhere, but I used parts of your solution in 2e38f4d#diff-612caacac62a32d8c8373caa792fac4d39710cae4349a5e974a59b26a0362640R57. It works great, will be shipping this with v7.1! |
Would love to see the ability to use regex patterns in the filtering, would make it easier to filter out content.
Examples:
filter to exclude items that have one or two digits in the title
(\b\d\b|\b\d{2}\b)
filter to exclude items that are surround by [] - [EXAMPLE], [10], [etc]
\[\w.+\]
The text was updated successfully, but these errors were encountered: