The Greatest Regex Trick Ever (2014)
Let me take these PhD level regex down to elementary school awesome.I have a process table and I want to grep it for the phrase "banana":ps auxww | grep bananaroot  87  Jun21   0:26.78 /System/Library/CoreServices/FruitProcessor --core=bananamikec 456 450PM   0:00.00 grep bananaArgh! It also greps for the grep for banana! Annoying!Well, I'm sure there's pgrep or some clever thing, but my coworker showed me this and it took me a few minutes to realize how it works:ps auxww | grep [b]ananaroot  87  Jun21   0:26.78 /System/Library/CoreServices/FruitProcessor --core=bananaDoc Brown spoke to me: "You're just not thinking fourth dimensionally!" Like Marty, I have a real problem with that. But don't you see: [b]anana matches banana but it doesn't match 'grep [b]anana' as a raw string. And so I get only the process I wanted!