I want to compare the - value present inside the string variable with the another string variable.
These values are dynamic.
2 string variables Vessel1 = NYK JOANNA 128S (NJOT) Comp_val= ‘NYK JOANNA 128S’ Arrival at Transhipment Port
NYK JOANNA 128S
So i have written the code as below
using one more variable Comp_Vessel1=Split( Vessel1.ToString,“(”)(0).ToString
@Seema_S
Looking to your feedback, could define a requirement like
From NYK JOANNA 128S (NJOT)
Use text without text in () = NYK JOANNA 128S = SearchString
And Look for LongString.Contains(SearchString)
I was using your split logic for extracting text without text in (). Removing the last space with the trim changed the result of contains from false to true