3
votes
4answers
595 views

Sort input file by the results of a regex

I'd like to sort a file based on the results of a regex expression. For example, if I have the following property declarations in Obj-C @property (nonatomic, strong) id <AlbumArtDelegate, ...
2
votes
2answers
1k views

Sort by regular expressions

I've got a set of POSIX regular expressions* ^BEGIN:VCARD\r$ ^VERSION[^A-Z] ^FN[^A-Z] ^N[^A-Z] ^NICKNAME[^A-Z] ^EMAIL[^A-Z] ^X-\([A-Z-]*\) ^TEL[^A-Z] ^ADR[^A-Z] ^ORG[^A-Z] ^TITLE[^A-Z] ^BDAY[^A-Z] ...