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.

Your first regex 30AnswerFind \bcat\bReplace dog<strong>The</strong> regex match as done in Sublime Text 2Congratulations on learning your first regex syntax. Word boundaries are a very useful pattern tomatch, and not just for finding cats. Sometimes we want to match just the last – or the first – digit<strong>of</strong> a string <strong>of</strong> characters, for instance.That backslash character will be a recurring character in our regex exploration, and one that hasdifferent effects when combined with different characters and contexts. For now, it’s good enoughto tell it apart from its forward-facing sibling.

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

Saved successfully!

Ooh no, something went wrong!