Hello,

Am using the latest version of the D8 module. I want to treat pdf and jpg downloads to open in a new window. I can successfully get one pattern to work on its own in Firefox. png or jpg but not both.

The pattern matching doesn't work at all in Safari.

Can anyone give me the correct javascript pattern matching to get this to work? I have tried \png | \jpg

Thanks

Comments

cruze72 created an issue. See original summary.

cruze72’s picture

Issue summary: View changes
elachlan’s picture

Status: Active » Closed (won't fix)

Did you try:
(png | jpg)

Try using a tool like https://regex101.com/

dadderley’s picture

Thanks elachlan,

https://regex101.com/ is cool

This works pattern works:
(png)|(pdf)|(jpg)|(jpeg)