1

I have compare Two strings.If str1 matches 80% of str2 then it should return true. else it should return false. Please help me to Find the solution. Thanks,

  • Please give examples. If not, this question will likely be closed very quickly – mplungjan Apr 16 '12 at 05:32
  • 1
    possible duplicate of [How to determine a strings dna for likeness to another](http://stackoverflow.com/questions/797688/how-to-determine-a-strings-dna-for-likeness-to-another) – Joseph Apr 16 '12 at 05:32
  • 1
    What does 80% match mean? This problem is not solvable without some sort of definition of what an 80% match is or do you just want us to make up our own definition of an 80% match. – jfriend00 Apr 16 '12 at 05:46
  • Try to introduce in more details, you need to give some criteria, for this task. for example "Hello world" and "world Hello". Are those strings matches 80% ? – emilan Apr 16 '12 at 05:49
  • View this may be help you http://stackoverflow.com/questions/4919403/javascript-compare-strings-without-being-case-sensitive – Hkachhia Apr 16 '12 at 05:50

1 Answers1

0

You can use similar_text() which behaves almost like PHP's equivalent similar_text()

Silviu-Marian
  • 10,565
  • 6
  • 50
  • 72