Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Ask HN: What's the most valuable thing you can learn in an hour?. Parent comment
John Smith > Smith, John Anna Peterson > Peterson, Anna
I can write:
(.) (.)
And replace with:
\2, \1
Not sure if that’s part of some “official” regex spec but it works more or less everywhere.
(Of course if it was an actual list of names I’d have to be a lot more intelligent with double names etc.)
There are no comments on this comment yet.
John Smith > Smith, John Anna Peterson > Peterson, Anna
I can write:
(.) (.)
And replace with:
\2, \1
Not sure if that’s part of some “official” regex spec but it works more or less everywhere.
(Of course if it was an actual list of names I’d have to be a lot more intelligent with double names etc.)