# Regexes

I really like regexes. They can do so much work for you! Sometimes I write some to do my work for me. And then I put them here for future reference:

Bracket not in separate line:

\S.*[{}]$\|[{}].\+ Delete whitespaces on end of line: s/\s\+$//

Incorrect spacing around assignment/comparison:

\S[\&|+=\!\-\*<>]=\|=[^ =]

s/\/\/$$.*$$/\/\*\1\*\//g
grep -rP “.{81,}” find -name ‘*.c’