.IP regex
A regular expression match in extended POSIX regular expression syntax
(much like egrep).
-The type specification can be optionally followed by
-.B /c
-for case-insensitive matches.
-The regular expression is always
-tested against the first
+The type specification can be optionally followed by /[cse]*.
+The ``c'' flag makes the match case insensitive, while the ``s'' or
+``e'' flags update the offset to the starting or ending offsets of the
+match (only one should be used).
+By default, regex does not update the offset.
+The regular expression is always tested against the first
.B N
lines, where
.B N
offsets, using
.B \e
escapes for special characters.
+.IP default
+This is intended to be used with the text
+.B x
+(which is always true) and a message that is to be used if there are
+no other matches.
.RE
.PP
The numeric types may optionally be followed by
then presumably print that string, by doing
.B >\e0
(because all strings are greater than the null string).
+.IP
+The special test
+.B x
+always evaluates to true.
.IP message
The message to be printed if the comparison succeeds. If the string
contains a
.BR printf (3)
format specification, the value from the file (with any specified masking
performed) is printed using the message as the format string.
+If the string begins with ``\\b'', the message printed is the
+remainder of the string with no whitespace added before it: multiple
+matches are normally separated by a single space.
.PP
Some file formats contain additional information which is to be printed
along with the file type or need additional tests to determine the true
.\" the changes I posted to the S5R2 version.
.\"
.\" Modified for Ian Darwin's version of the file command.
-.\" @(#)$Id: magic.man,v 1.33 2006/10/31 19:37:16 christos Exp $
+.\" @(#)$Id: magic.man,v 1.34 2007/01/08 17:09:30 christos Exp $