February 2004
Intermediate to advanced
160 pages
2h 27m
English
All the expressions used thus far have matched text, but sometimes you may want to use expressions to mark the position of text to be matched (in contrast to the matched text itself). This involves the use of lookaround (the capability to look ahead and behind), which will be explained in this lesson.
Again, we’ll start with an example. You need to extract the title of a Web page; HTML page titles are placed between <TITLE> and </TITLE> tags in the <HEAD> section of HTML code. Here’s the example:
![]()
<HEAD><TITLE>Ben Forta’s Homepage</TITLE></HEAD>
<[tT][iI][tT][lL][eE]>.*</[tT][iI][tT][lL][eE]> ...
Read now
Unlock full access