0

I'm trying to create a list of game names and compare it to a website however the game name aren't always 100% the same text is there a way i can do a partial comparison ?

This is the title on the website
Transformers_Ultimate_Autobots_Edition_EUR_NDS-EXiMiUS

This is the title i have
Transformers_Ultimate_Autobots_Edition_EUR_MULTi5_NDS-EXiMiUS

So they are slightly different.

This is the script im using to compare it too on the website:

//Get Release Number
$pattern_releaseNumber = ('#<b>(.*?)</b> title="'.$mygamename.'">\s*#');
preg_match_all($pattern_releaseNumber,$dsScene,$match_test);
print_r($match_test);

Hope this makes sense.

Thanks

Exoon
  • 1,513
  • 4
  • 20
  • 35
  • 1
    [`similar_text`](http://www.php.net/manual/en/function.similar-text.php) – Emissary Dec 30 '13 at 22:21
  • I'd look into functions like metaphone, soundex and levenshtein – gwillie Dec 30 '13 at 22:21
  • Retrieving illegal content with a crawler; who hasn't done that before? :P The problem mostly is that you have a single(looking) space. If you're unsure (Web Inspector often styles different than the original source). You might need to use `\s+` on the spot after the ``. As far as the name-matching goes. You might aswel just accept all the names with a pattern and afterward sort out from the array of results which you want to use. Once you start using RegEx, it's not like you have to do everything with it ;) –  Dec 30 '13 at 22:22
  • Thanks, similar_text looks interesting will check that out. @Allendar -Its nothing illegal im gathering screenshots for games based on the content at ds-scene website. – Exoon Dec 30 '13 at 22:38

0 Answers0