Mailing List Archive

Leaning toothpick syndrom (was: KAM_SOMETLD_ARE_BAD_TLD false positive)
On 8/11/2021 8:05 AM, Kenneth Porter wrote:
>
> BTW, does SA permit use of Perl-style regex delimiters to avoid
> leaning toothpick syndrome?
>
> https://en.wikipedia.org/wiki/Leaning_toothpick_syndrome
>
Answering my own question, I see it used in this rule:

uri        __IMGUR_IMG
m,^https?://(?:[^.]+\.)?imgur\.com/[a-z0-9]{7}\.(?:png|gif|jpe?g)$,i

I see a dozen rules in the latest SA rule update using the m<delimiter>
scheme to avoid having to escape slashes in a uri. The result is
significantly more readable.
Re: Leaning toothpick syndrom (was: KAM_SOMETLD_ARE_BAD_TLD false positive) [ In reply to ]
As a note, I sometimes make my rules harder to read on purpose to dissuade
bad actors from trying to unwind them.

On Wed, Aug 11, 2021, 11:21 Kenneth Porter <shiva@sewingwitch.com> wrote:

> On 8/11/2021 8:05 AM, Kenneth Porter wrote:
> >
> > BTW, does SA permit use of Perl-style regex delimiters to avoid
> > leaning toothpick syndrome?
> >
> > https://en.wikipedia.org/wiki/Leaning_toothpick_syndrome
> >
> Answering my own question, I see it used in this rule:
>
> uri __IMGUR_IMG
> m,^https?://(?:[^.]+\.)?imgur\.com/[a-z0-9]{7}\.(?:png|gif|jpe?g)$,i
>
> I see a dozen rules in the latest SA rule update using the m<delimiter>
> scheme to avoid having to escape slashes in a uri. The result is
> significantly more readable.
>
>
>