RegEx Notes

Text Block 1:

2012 Nationals Lineup, Sort Of (via Anthony DeBarros) |
Search String: NAME: ([-\.\w ]*)POS: ([A-Z]{2}) AGE: (\d+) WT: (\d+) BORN: ([\w. ]+), ([A-Z]{2}) SALARY: (\d+|N\/A)

Text Block 2:

A Bunch of Random Phone Numbers |
Search String ([0-9]{3})[-. )\/]*([0-9]{3})\D*([0-9]{4})
Better Search String \(*([0-9]{3})\D*([0-9]{3})\D*([0-9]{4})
Replace String \(\1\) \2-\3 and

Dan Nguyen is awesome. His book, The Bastards Book of Regular Expressions is probably also awesome.

If you're already pretty good at regular expressions, check out the Tuesday Challenge or Hacker Rank's Challenges. The RegEx Crosswords are fun, if cryptic. Lookaheads will make your brain hurt a little, but that doesn't mean they aren't worth understanding.

And if you have LibreOffice you can have the cheatsheet. You might also want the little Python script I used to butcher all those phone numbers.