Regular Expressions 101

Community Patterns

Community Library Entry

1

Regular Expression
PCRE2 (PHP >=7.3)

/
(<a.*href=(("|')(.*pdf)("|')))
/
gm

Description

This regex is written for a Joomla plugin. This REGEX force to DOWNLOAD à PDF file instead of showing PDF in browser

Submitted by Sébastien LHUILLIER - a year ago