Regular Expressions 101

Community Patterns

RegEx for matching PDF files in browser


Regular Expression
PCRE2 (PHP >=7.3)



Made for my niche use of adding it to match either PDF files that being viewed directly from a website or when viewed from your local computer. This was done so that I can add it on my usercontent.css file in Firefox with the @-moz-document url-prefix

Submitted by Benji The Doggy - a year ago (Last modified 9 months ago)