On 27/10/2022 15:02, John Levin via GLLUG wrote:
johnl@Hasek:~/github/statutes$ grep ' [-—. ]\{3,\}$' W*/mon*.txt
and every of them are and is hereby obliged to accept, re- ...
'fliqitors autj licences, — Aorb’s -----
IPfipficians, -----
II — -- — -.... - -- - - - —
shall be ~ - - —

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

I think it's the hyphen, which if I recall correctly has a special meaning if anywhere other than the beginning of the character class (certainly I am always in the habit of always putting hyphens at the beginning of character classes, if that's what I want to match).


Andy

--
GLLUG mailing list
[email protected]
https://mailman.lug.org.uk/mailman/listinfo/gllug

Reply via email to