News for hackers. Stuff that matters.
Re:The Lost Art of Typing Shit by Hand by imagist on Thursday September 01, 2016 @01:37PM (#12407276)
> Pop quiz: which is the character code for a word character, \w or \W?

From memory, \w. Conceptually, this is because in regular expressions, capitalization indicates negation. \w matches word characters, \W matches non-word characters, \d matches digits, \D matches non-digits, \s matches whitespace, \S matches non-whitespace.

Having a conceptual understanding helps to be able to extrapolate more information with less memorization.

I don't mean this as a refutation of your overall point; I think your point is correct, that using cheat sheets allows you to save mental bandwidth. I just think this wasn't a great example.

There are no comments on this comment yet.