Re: regex/wildcard in mc.ext

Andrew Borodin via mc <[email protected]>
Newsgroups gmane.comp.gnome.apps.mc.general
Message-ID <[email protected]>
On Sat, 3 Dec 2022 11:47:17 +0100 Fourhundred Thecat via mc <[email protected]> wrote:
> what type of regex/wildcard can I use in mc.ext ?
> 
> I have this for JPEG:
> 
>    type/^JPEG image data
> 	Include=image
> 
> Instead of creatin same rule for every image format:
> 
>    GIF image data
>    JPEG image data
>    ...
> 
> can I use some regex to match anything starting with:
> 
>    ^ONE_WORD image data

type is the output of "file" utility:

$ file -b 2_34ub2.png 
PNG image data, 540 x 403, 8-bit/color RGB, non-interlaced
$ file -b 1_e945d.jpg 
JPEG image data, Exif standard: [TIFF image data, little-endian, direntries=6, xresolution=86, yresolution=94, resolutionunit=2, software=Adobe Photoshop Lightroom 5.0 (Windows), datetime=2014:03:27 21:16:12], baseline, precision 8, 1000x658, components 3

Of course, you can create a regular expression that matches all such lines, but it will be
too complicated.

-- 
Andrew

-- 
mc mailing list
[email protected]
https://lists.midnight-commander.org/mailman/listinfo/mc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.