I have two strings containing letters and numbers separated by spaces. ex String1″elza7ma wa2fa fel matab” and String2″2ana ba7eb el za7ma 2awy 2awy”.
I want to get each word of String1 is compare to all words of String2 and also generate percentage of compare words. If Percentage of compare words is greater then 80% return that words for further use.
you can use the
split()method of theStringclass to get each seperate word of the two strings returned to you in an array then you can loop through the arrays to find the matching words.That’s a pretty simple example and should get you started in the right direction. You will get better help if you try writing the code yourself first and then ask questions if something is not working correctly and provide some code for review.