XML technologies / Regular expressions / Introduction to regular expressions / A personal aside
(Excerpt from "Regular expressions" by Jeffrey E. F. Friedl)
The doubled-word problem at the chapter’s start may seem daunting, but regexes are powerful enough that even a limited tool like egrep solved much of it in this first chapter. I would like to add some surprising or amusing examples, especially after stressing how much remains to learn. Readers who have seen all the warnings but know little about regexes may be wondering what the point is.
My brothers once tried teaching some friends Schaffkopf , a card game played in our family for generations. It is more exciting than it initially seems, but its rules are not easy to learn. After half an hour, my normally patient sister-in-law Liz asked, “Why not just play Rummy?”, a simple poker or rummy variant. We nevertheless continued well into the night. Once the difficult initial learning phase passed, enthusiasm kept everyone going. My brothers knew the effort was worthwhile, but Liz and the other newcomers needed time to appreciate it.
Getting comfortable with regexes may take time. Before enthusiasm develops, it can all seem too academic. If so, I hope you can resist the urge to play Rummy. Once you can use regexes and exploit their power, the initial learning effort will seem negligible.
German edition copyright © 2008 by O’Reilly Verlag GmbH & Co. KG
You may print the online version for private use.
Otherwise, this chapter from "Reguläre Ausdrücke" is subject to the same terms as the bound edition: the work and all its parts are protected by copyright. All rights reserved, including reproduction, translation, microfilming, storage and processing in electronic systems.
O’Reilly Verlag GmbH & Co. KG, Balthasarstr. 81, 50670 Köln
back to top