Substring based on delimiter


I wanted to get the substring based on some delimiter. For example:

Example 1-

Example 2-
output: titan

In example1, we can use the delimiter as “>”
In example2, we can use the delimiter as “.”

We didn’t have the fixed numbers of characters here, as the site name may vary.
So how should I write in my assign activity, to get such output?

Please help with this.

If you have a string MyStr, you can get the first element based on a delimiter like this:


This will return “” in the first example. You would only need to change this to: MyStr.Split("."c)(1) for the second example.

But if you want to perform both operations in one line, you can use this:

MyStr.Split(">"c)(0).Split("."c)(1), which returns “titan” if MyStr is “>shop>watches”.

1 Like

Thank you so much.

Need one more help,
Input: PC Jeweller/Customer service1800 120 1434Click on the errorNo errors? Give general feedback.Feedback
Output: 1800 120 1434

Input: Featured snippet from the web1800-266-0123You need to call the customer care on 1800-266-0123 or email us at to cancel your order
Output: 1800-266-0123

It means I am having a link, and I need to get only the contact details from that.
In short, I need the value between first integer value till the next character come, the number between them.
Can you help with this.


1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.