[GLLUG] Grep question

Philip Hands phil at hands.com
Thu Oct 27 18:06:01 UTC 2022

John Levin via GLLUG <gllug at mailman.lug.org.uk> writes:

> Is there something about the order of characters in regex square 
> brackets? Does the stop have a special meaning when given first?

The place to find the answer is in the regex(7) manpage:


in which you'll find this sentence regarding bracket expressions:

  To include a literal '-', make it the first or last character,
  or the second endpoint of a range.

  (there's also more there about how to start a range with a `-`)

Cheers, Phil.
|)|  Philip Hands  [+44 (0)20 8530 9560]  HANDS.COM Ltd.
|-|  http://www.hands.com/    http://ftp.uk.debian.org/
|(|  Hugo-Klemm-Strasse 34,   21075 Hamburg,    GERMANY
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20221027/c8c9bdbf/attachment.sig>

More information about the GLLUG mailing list