13.07.2015 Views

Download - The Bastards Book of Regular Expressions

Download - The Bastards Book of Regular Expressions

Download - The Bastards Book of Regular Expressions

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CONTENTSOptionality and alternation 92Alternation with the pipe character . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92Optionality with the question mark . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94Laziness and greediness 99Greediness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99Laziness . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101Lookarounds 105Positive lookahead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105Negative lookahead . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Positive lookbehind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107Negative lookbehind . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109<strong>The</strong> importance <strong>of</strong> zero-width . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110Regexes in Real Life 111Why learn Excel? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111<strong>The</strong> limits <strong>of</strong> Excel (todo) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Delimitation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111Mixed commas and other delimiters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Dealing with text charts (todo) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Completely unstructured text (todo) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119Moving in and out and into Excel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120From Data to HTML (TODO) 124Simple HTML tricks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124Tabular data to HTML tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127Mocking full web pages from data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127Visualizations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127<strong>The</strong> Exercises 128

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!