Приглашаем посетить
Блок (blok.lit-info.ru)

Section 15.8.  The Regular Expressions Coach

Previous
Table of Contents
Next

15.8. The Regular Expressions Coach

Although there is no doubt that regular expressions are incredibly useful, they also easily get out of hand when trying to match complex strings. Furthermore, anything past twelve or so characters gets hard to read and understand, which is a common source of bugs.

To work around this problem, I suggest you use a program called the Regex Coach (pictured in Figure 15-1), available from http://www.weitz.de/regex-coachit is free to use non-commercially, and it is able to help you check that your regular expressions are correct by visually highlighting strings that match. The Coach is fully compatible with all the options shown here, including string replacement, and can even break down a regexp and describe it in plain English.

Figure 15-1. Use the Regex Coach to try out regular expressions and get instant feedback
Section 15.8.  The Regular Expressions Coach



Previous
Table of Contents
Next