Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Beginning Regular Expressions 2005.pdf
Скачиваний:
101
Добавлен:
17.08.2013
Размер:
25.42 Mб
Скачать

String, Line, and Word Boundaries

Less-Common Word-Boundary Metacharacters

Other word-boundary metacharacters that mark either a beginning-of-word or end-of-word word boundary are available in some languages or tools.

Exercises

These exercises allow you to test your understanding of some of the information in this chapter.

1.You learned that the \b metacharacter can match a word boundary at the beginning of a word or the end of a word. What pattern, using the \b metacharacter, will match the same text as the pattern the\>?

2.Create a pattern that will match the sequence of characters the in lather but that won’t match the same sequence of characters in then or in lathe.

169