Back to front pageView on Hacker News (opens in a new tab)Ask HN: What is the most beautiful piece of code you've ever read?476 pointsby seisvelas (on Hacker News)7 years agoPreferably an elegant snippet rather than an entire (well engineered) codebase.Comments (380) 116 threadsShow all commentsShowing thread 57 of 116Xelbair7 years ago#I once had to find all lines which did not contain a specific word. As back then i was absolutely new to regex stackoverflow came to the rescue - and i still have that link saved to this day - https://stackoverflow.com/a/406408Regex for that is just great ^((?!word).)*$
Ask HN: What is the most beautiful piece of code you've ever read?476 pointsby seisvelas (on Hacker News)7 years ago
Xelbair7 years ago#I once had to find all lines which did not contain a specific word. As back then i was absolutely new to regex stackoverflow came to the rescue - and i still have that link saved to this day - https://stackoverflow.com/a/406408Regex for that is just great ^((?!word).)*$
Comments (380) 116 threads
Show all comments
Showing thread 57 of 116
Regex for that is just great