How to find multiple instances of a element in a string

code
studio

#1

Hi,

I have a string:- “ABCnameABCnameEFnameGHI”

I have to find the value of second and third “name”.Length of the name is not fixed.How to do that?


#2

did you try using split string activity with abc as splitter?


#3

Hi @PULKITGUPTA

Try this
yourString.Split({“name”},StringSplitOptions.RemoveEmptyEntries)(Nth value)

Eg : “ABCnameABCnameEFnameGHI”.Split({“name”},StringSplitOptions.RemoveEmptyEntries)(2)

It gives EF

Best Regards,
Ranjith.


#4

Hi @PULKITGUPTA,

You could try to follow the example attached:
Main.xaml (8.6 KB)

image

imageimage