How to get a search script to disregard meta tags?

They have: 14 posts

Joined: Jan 1999

Hi all. I'm using Matt's Script Archive Easy Search script and it's fantastic. The only hangup I have is that I 've got a site that has the same Meta Tags on each page. If a search keyword happens to be in the Meta Tag, then every page on the whole site gets listed.

How would one work the regular expression searching to avoid anything in between <Meta and the end of the tag > ?

Thanks for any help!

------------------

They have: 447 posts

Joined: Oct 1999

something like /<META.+>/ will match meta tags. im not familiar with the script, post it if you need more help

They have: 359 posts

Joined: Mar 1999

If I might be curious, why are you using the same tags on each page? Unless every page is identicle, I would make your meta tags match the page content

Dan
Recycle Video Games Network

Stupidity killed the cat, curiosity was framed!

They have: 568 posts

Joined: Nov 1999

I have to agree with cds. You really need to change those tags.

They have: 850 posts

Joined: Jul 1999

I think that Matt's script opens each file up, stores it in a $variable and than searches it. So after the contnets of the file is placed in $string, just add:

code:

$string =~ s/<meta(.*)>//gi;
[/code]
So that will look for any meta tags, and delete them from the $string.

Hope that helped.

------------------
http://www.wiredstart.com  : The Technology Start Page

[This message has been edited by robp (edited 15 April 2000).] 

They have: 14 posts

Joined: Jan 1999

Hey, that's exactly what I was looking for! I'd have different meta tags on the pages, but at 267 pages total for the site with more to come, the suits don't want to spend the money for me to make those changes.

I think this'll work - I'll keep ya posted!

------------------

They have: 359 posts

Joined: Mar 1999

You might want to point out to the "suits" that if they spent the money, they have 267 different chances of getting listed someway in the search engines vs. 1 way and have the chance of a search engine saying, wow, this guy is trying to spam us and delete your listing completely.

Dan

Dan
Recycle Video Games Network

Stupidity killed the cat, curiosity was framed!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.