I have multiple lines where person designation and company name is mentioned with the separator " at "
the line is like (Digital Marketing Consultant at Digital Market Solutions, Inc.) so I need to split both values like “Digital Marketing Consultant” and “Digital Market Solutions, Inc.”
I had tried item.subtring(item.indexof(" at “, 10) it is picking the value after at but not working when I try like item.subtring(item.indexof(” at ", -10) .
@manish0077…Follow below steps, this should work.
Str = “Digital Marketing Consultant at Digital Market Solutions, Inc.”
StrArray = Split(Str," at ") – Array of String
Str1 = StrArray(0)
Str2 = StrArray(1)
Str1 and Str2 will hold your expected strings.
Input = “Digital Marketing Consultant at Digital Market Solutions”
Index = Input.IndexOf(“at”)
Company = Input.Substring(Index).Replace(“at”,String.Empty).Trim
Also, make sure you give blank spaces before and after “at” while performing the split. Otherwise, the logic may fail in case “at” appears anywhere else in your string.
Please mark this as solution if it works for you. Thank You.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.