Find the middle elemets of an array


#1

Hi everyone.

I have arrays of strings such as:

No.1 Black Samsung Galaxy $80 Each
No.2 Silver Surface Pro 4 $400 EA
No.3 White Display Digital Alarm Clock $300 Dozen

I like to remove both first two elements (e.g. “No.1” and “Black”) and last two elements (e.g. “$80” and “Each”) from the original array:

Samsung Galaxy
Surface Pro 4
Display Digital Alarm Clock

Is there any way to find the middle elements inside?

Thanks in advance :slight_smile:

Find the middle elemets.xaml (8.1 KB)


#2

Hi @anna100,
Use regular expression to get that value

Pattern: (^No.. \w+)(.*)(?=\$)

Regards,
Arivu


#3

It worked! I appreciate your help:grinning:

Find the middle elemets_updated.xaml (9.6 KB)


#4