afterxleep / Bouncer

A private SMS filtering application for iOS

Home Page:https://apps.apple.com/us/app/bouncer-sms-block-list/id1457476313

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add information about Regular expressions support

afterxleep opened this issue · comments

Display a message at the bottom of the add/edit form, to let the user know that regular expressions can be used as filters.

After finding that my patterns are matching message I did not expect them to I suspect the '.' in the pattern '.me' is matching any character.

Could we get a pointer to which kind of regex is used? Is this it?

Regular Expression Syntax

Meanwhile the app is extremely helpful. Sure, it would be nice if it had a way to import/export config but it does a much better job than what I was using before!

Hi @leres

Filtered is done via range(of: options), doc here.

Then I use Compare options to match regular expressions, which uses an ICU compatible regex format.

Here is a little bit more info about that

Hope it's helpful.

I'll try to add a little more info to the app about it for further reference as part of the ticket.

ICU seems to be the same (or at least very similar) to the swift documentation I linked to; being able to match word boundaries is handy, e.g. '.me\b'

Can you send me a list of the strings your are seeing incorrectly and correctly matched? I can write some unit tests to validate.

The pattern I suspect is '.me' (it matched '<message'). I likely got a spam txt containing http://<random string>.me

This seems more like a documentation problem than something a unit test can protect against. Now that I know I need to escape '.', I'm not likely to have any more problems.

Ah, no I seem to understand your problem. I guess it's more about adding an option to the app to treat the provided sting as a regular expression or just plain text. That way for 'normal' strings you will not have to escape characters or anything.

I will create a new issue to add that feature.

Hey there!:

I've added a new setting in every filter that allows you to use "Regular" text search vs Regular expressions. You can join the beta and get it here:

https://testflight.apple.com/join/Lls6XUfx