[mc] regex/wildcard in mc.ext
Andrew Borodin
aborodin at vmail.ru
Sat Dec 3 13:07:41 UTC 2022
On Sat, 3 Dec 2022 11:47:17 +0100 Fourhundred Thecat via mc <mc at lists.midnight-commander.org> 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
More information about the mc
mailing list