From: Reuben Thomas Date: Mon, 11 Feb 2008 23:26:17 +0000 (+0000) Subject: Clarify documentation of search and regex matches, and sync with X-Git-Tag: FILE5_05~500 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3926ecc7ffbf1a969ee2f867af0f1c038912f9f8;p=file Clarify documentation of search and regex matches, and sync with actual behaviour of program. --- diff --git a/doc/magic.man b/doc/magic.man index df80a5a8..e0bca67a 100644 --- a/doc/magic.man +++ b/doc/magic.man @@ -1,4 +1,4 @@ -.\" $File: magic.man,v 1.45 2008/02/11 22:14:25 rrt Exp $ +.\" $File: magic.man,v 1.46 2008/02/11 23:26:17 rrt Exp $ .Dd January 10, 2007 .Dt MAGIC __FSECTION__ .Os @@ -149,16 +149,12 @@ than UTC. .It Dv regex A regular expression match in extended POSIX regular expression syntax (much like egrep). -The type specification can be optionally followed by /[cse]*. +The type specification can be optionally followed by /[c][s]. The .Dq c flag makes the match case insensitive, while the .Dq s -or -.Dq 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. +flag update the offset to the start offset of the match, rather than the end. The regular expression is tested against line .Dv N + 1 onwards, where @@ -179,7 +175,7 @@ which specifies how many matches shall be attempted (the range). This is suitable for searching larger binary expressions with variable offsets, using .Dv \e -escapes for special characters. +escapes for special characters. The offset works as for regex. .It Dv default This is intended to be used with the text .Dv x @@ -478,4 +474,4 @@ a system on which the lengths are invariant. .\" the changes I posted to the S5R2 version. .\" .\" Modified for Ian Darwin's version of the file command. -.\" @(#)$Id: magic.man,v 1.45 2008/02/11 22:14:25 rrt Exp $ +.\" @(#)$Id: magic.man,v 1.46 2008/02/11 23:26:17 rrt Exp $