Well, Alfie (or Austin), you’ve come a long way. This chapter contained some pretty powerful and complicated material. I bet if you tell your friends and neighbors that you’ve learned to program using regular expressions, they’ll be mightily impressed.
It’s the case that coding with text strings, which with a nod to the control freaks among us is often called string manipulation, is important to a great many programs. If you can program well with strings, you’ve probably learned to be a good programmer. The material in this chapter should have you well on your way to becoming a veritable Machiavelli with strings!
The next chapter, Chapter 10, “ Error Handling and Debugging,” covers some very important material relating to program flaws, or bugs. What are the different kinds of program bugs? How are they best avoided in the first place? How can you test your programs to uncover bugs? How can you find and fix bugs if you have them? What’s the best way to write code to “bullet proof” it against bugs?
So I’ll see you in the next chapter for the big bug roundup! Yee-haw!
Regular expressions are fun. See what you can come up with! If you write a neat program in JavaScript that uses regular expressions, send it to me (use the email address <learntoprogram@bearhome.com>).
I’ll publish the best examples I get in the next edition of this book. You’ll receive credit for the program and a free copy of the book when it’s republished.