Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^(mm[gvis]([0-9]{1,3})?|((media(\.|-)[a-zA-Z]{1,4}[0-9]{1,2}-[0-9]{1,2}\.)(cdn|fna)))\.whatsapp\.net$
/
gm

Description

Simple Regex for preventing file and multi-media upload on WhatsApp. Can be used on forward proxy deployments which applies SSL Inspection.

Reference documentation :

Submitted by ulgena - 3 years ago (Last modified 3 years ago)