# regex snippet for matching # at most two bundled extensions # foobar.gzip -> foobar,.gzip # foobar.tar.gzip -> foobar,.tar.gzip # foo.bar.tar.gzip -> foo.bar,.tar.gzip # the snippt should paste into place over # my earlier matches for filename and extension ( #capture the filename [^./?] # doesnt start with a . or ? or / [^/?]+? # all chars not / or ? , (ctd.) # --leave stuff for rest of rex )? #we dont have to have a filename ( #capture the extension (?: # Group but dont capture \. # they start with dots you know [^?.]* # any letter that arent a . or ? ){0,2} # anywhere from 0 to 2 exts please. ) #thanks.. # regex snippet for matching # filename and all bundled extensions # foobar.gzip -> foobar,.gzip # foobar.tar.gzip -> foobar,.tar.gzip # foo.bar.tar.gzip -> foo,.bar.tar.gzip # the snippt should paste into place over # my earlier matches for filename and extension ( #capture the filename [^./?] # doesnt start with a . or ? or / [^/?.]+? # all chars not / or ? or. # --leave stuff for rest of rex )? #we dont have to have a filename ( #capture the extension \. # they start with dots you know [^?]* # any letter that arent a or ? )? #they are optional you know