You do realize there is a PHP function for that, I think...

It will not work properly on oddly-formatted META tags, though...  Go fit
it, after you figure out the right Regex expressions.

You'll want the non-greedy Regex (POSIX or Perl, I forget which is which).

WARNING [EMAIL PROTECTED] address is an endangered species -- Use
Wanna help me out?  Like Music?  Buy a CD:
Volunteer a little time:
----- Original Message -----
From: Kyle Mathews <[EMAIL PROTECTED]>
Newsgroups: php.general
Sent: Friday, August 10, 2001 12:29 PM
Subject: Meta Tags and Regular Expressions

> 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
> 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

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to