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.

Specific and limited repetition 5010020005000004 million2 million1 million80009 millionAnswerFind 0{6}Replace millionBonus exercisePerform the same exercise as above, but with this list <strong>of</strong> numbers:90080000009000000070000100000000200000050000000000If you use the exact solution as in the prior example, you’ll end up with this:9008 million9 million0700001 million002 million5 million0000Oops. That pattern matched and replaced the first six zeroes. What we need is to replace the lastsix zeroes:

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

Saved successfully!

Ooh no, something went wrong!