December 2012
Intermediate to advanced
316 pages
6h 51m
English
In this recipe, we will see how an HTML code may be read and interpreted using regular expressions. We will create a program that will read an HTML stream in a string and will display the tag names along with the content of the tags. The FIND and replace statements are used together with a do loop. (This recipe will focus on reading tags beginning with <tag> and ending with <\tag>).
For creating a program for interpreting HTML code, follow the steps shown in the following steps:
htmlstream, tagcontents, and tagname.htmlstream variable.FIND REGEX statement is added that finds tag names and their contents. The regex ...Read now
Unlock full access