[COFF] Requesting thoughts on extended regular expressions in grep.

Ralph Corderoy ralph at inputplus.co.uk
Sat Mar 4 03:38:56 AEST 2023


Hi,

> Dave Horsfall <dave at horsfall.org> wrote:
> >     # Yes, I have a warped sense of humour here.
> >     /^[JFMAMJJASOND][aeapauuuecoc][nbrrynlgptvc] [ 0123][0-9] / \
...
> in particular, the original is easy to validate by just saying the
> names of the month out loud as one scans the list.

Some clients pay me to read code and find fault.  It's a hard habit to
break.  ‘coc’ smells wrong.  :-)

A bit of vi's :map later...

    Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dcc

The regexp works, of course, but in this case removing the redundancy
would also fix the ‘fault’.

-- 
Cheers, Ralph.


More information about the COFF mailing list