How to get string data based on the index?

I wanted to extract the data after the date and should not include the company , Ive tried using regex but does seem to solve it . The output for example should be “MARK LATIN” , but its hard to consider since the data is dynamic and we have to consider spaces.
Sample Data

“06/16/2020 MARK LATIN TOYOTA COMPANY XLS”
output : MARK LATIN
“06/16/2020 Jhon Vios Test COMPANY 101 XLS”
output : Jhon Vios

hi,
you can try to split the data by space and then,
for eg :- in above scenario

  1. Input = 06/16/2020 MARK LATIN TOYOTA COMPANY XLS
  2. After splitting your array by space InputArray(0) = 06/16/2020
  3. Replace InputArray(0) from your input.
  4. You remain with MARK LATIN TOYOTA COMPANY XLS
  5. Get the index of Company which will be 4
  6. then under the assumption that before COMPANY word you will have its name which we have to skip
  7. your result will be InputArray(1)+InputArray(2) and if name is having 3 words then also you can get the output.

I hope it helps.

The problem is that the comany text is not always present for example on this one

“06/16/1920 JHON MARK ALIBABA TRU”
OUTPUT : JHON MARK

Check the attached workflow @Jelrey,
Regex_Extraction.xaml (6.2 KB)
Hope this may help you :slight_smile:

Sir , can we also consider 3 spaces like for example

06/16/2020 MARK LATIN JUNIOR TOYOTA COMPANY XLS
OUPUT WOULD BE : MARK LATIN JUNIOR

LIKE MAX SPACE IS 3 , cause right now when the input is
06/16/2020 MARK LATIN JUNIOR TOYOTA COMPANY XLS

the output is only : MARK LATIN
what I need is MARK LATIN JUNIOR

@Manish540

Check this below updated workflow, @Jelrey
Regex_Extraction.xaml (7.5 KB)
Sorry for the delay :slight_smile:
You can remove the for each from the above workflow and Input string you can keep it as single string, after that keep if condition and last message box to display.

@Manish450 , btw sir last thing , how can we extract text that are only capslock on the string ?

for example
08/11/2020 MY TEST HELLO Mortgage Company TRU

Output should be “MY TEST HELLO” since its the string that all capital letters , TRU should be excluded

Hi @Jelrey

Below is the Regex for the same :-

image

Happy Automation :raised_hands:

Best Regards
Er Pratik Wavhal :robot::man_technologist:t4: :computer:

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