Mystring1 : WWT( world wide technologies)
mystring2: world wide technologies
Here i cant use mystring2.contains(mystring2)
Please help me out to do any word match
Mystring1 : WWT( world wide technologies)
mystring2: world wide technologies
Here i cant use mystring2.contains(mystring2)
Please help me out to do any word match
Jhey
You can use the matches activity
Regards
it wont match bcz string 1 and string2 is different
IndexOf is the alternative of Contains, but I’m not sure how to use it. You can try that if you have any idea
it wont be same example as i given it might changes dynamically
indexof always takes staring word right.
Mystring1 : WWT( world wide technologies)
mystring2: world wide technologies
Here i cant use mystring2.contains(mystring2)
Please help me out to do any word match
Hi
Apart from contains method we can use Regex method
Like this
System.Text.RegularExpressions.Regex.IsMatch(strinput.ToString,”(world wide technologies)”)
Cheers @brindhaS
It’s more similar to contains and even that string inside the contains method is a part of the main string then it would give us true or as false
Cheers @brindhaS
my assumption is it returns true only if full string matches
Hi @brindhaS
Sorry, but I will have to merge this topic with your other topic because it is the same question…
Forum rules my friend
@HareeshMR - Thanks for sharing the link to the other post…
sorry for that
thanks
You mean like you want to search
Mystring2 in Mystring1
Or
Mystring1 in Mystring2
Literally searching Mystring1 in Mystring2 won’t work buddy
But in turn Mystring2 in Mystring1 will work for sure both in contains and Regex method
Cheers @brindhaS
Yes ,it wont work is there is some other way to do
No Im sorry i did a mistake
mystring2.contains(mystring1)
Fine there is a possibility
Like this
System.Text.RegularExpressions.Regex.IsMatch(mystring2.ToString,”(?<=\W\s).*(?=\W)”)
Cheers @brindhaS