This could be tricky, easy or impossible... I'm not sure
I have a list of domains and I'm trying to match them as closely as possible to the website name in the "title" tag.
For example...
Domain: www.yahoo.com Title: Yahoo! Result: Yahoo! Domain: www.thegreenpages.com Title: Welcome to The Green Pages. Result: The Green Pages Domain: www.experts-exchange.com: Title: Experts Exchange - The #1 resource on the web for solving technology problems. Result: Experts Exchange
So you can see the problem here. I need to consider case, spaces and any domain special characters. I also need to capture any special characters like the ! in Yahoo! but not something like a period which would just be the end of a sentence and whatever else you can think of.
Make sense?
In PHP.
I truly, truly suck at these types of pattern matching problems :)