Meta Tags and Regular Expressions
| From: | Kyle Mathews | Date: | Fri, 10 Aug 2001 17:29:26 +0000 |
| Subject: | Meta Tags and Regular Expressions | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-62194@lists.php.net to get a copy of this message | ||
Hello:
I'm looking for a good way to pull information from a static HTML file for
dumping into a database.
I need to pull the information from a META tag, and from within two comments
in the HTML file.
I know this can be done with regular expressions, but I'm not really sure
where to start or how to do it.
<META name="CATEGORY" CONTENT="Test Content">
I need to pull the CONTENT information from this META tag.
<!-- STORY START -->
Story contents
<!-- STORY END -->
Then pull the information from between these two comments.
Any help, and/or example code would help a lot.
Thanks,
Kyle
kyle@thedip.net