Regular Expressions 101

Detect Multiple File Extensions

Open Workspace
  • PCRE (Legacy)
  • Match
1

Regular Expression

/
^([\w.]{1,})\.([\w]{3,4})\.([\w]{3,4})$
/
gm

Description

I use this to find files with two or more extensions (i.e. file.txt.txt). This will work with files with 3 or 4 character or numeric (or both) file extensions (i.e. pdf, xlsx).

Submitted by Curve