Ok lets say I want to look through a html source and pick out any links and put them in an array.
html page:
<html>
<head>
</head>
<body>
<p>
Some text <a href="page2.html">click here</a> More text <a href="page3.html">click here</a> Even more text <a href="page4.html">click here</a>
</p>
</body>
</html>
I'm guessing it goes something like this:
- something opens and reads the file
- something puts each line of the file into an array
- something searches for each instance of: a href="*.html (the asterisk is a wildcard right?)
- something takes each instance of: a href="*.html and puts whatever the wildcard found into a new array
- now i can do whatever i want with it like print out a list of all the links it found
do I have any idea what I'm talking about?