WolfWorld Posted February 18, 2008 Posted February 18, 2008 How to find something in common Like one string is "Hello world I love you" and the other is "Bye world I love ha" Will get " world I love " How ??? Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets!
WolfWorld Posted February 18, 2008 Author Posted February 18, 2008 I don't want that look stringinstr("Hello world I love you", "Bye world I love ha") Will return 0 And i don't want that I want it to return " world I love " Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets!
Squirrely1 Posted February 18, 2008 Posted February 18, 2008 This works, but the leading and trailing whitespace is stripped off the $result Global $StringA = "Hello world I love you" Global $StringB = "Bye world I love ha" Global $result = "" $arr = StringSplit($StringA, " ") For $i = 1 To Ubound($arr) - 1 If StringInStr($StringB, $arr[$i]) Then $result &= $arr[$i] & " " EndIf Next $result = StringStripWS($result, 3) MsgBox(0, "$result", $result) Das Häschen benutzt Radar
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now