Jelrey
(Mohamed Salutin)
August 27, 2020, 12:44pm
1
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
Input = 06/16/2020 MARK LATIN TOYOTA COMPANY XLS
After splitting your array by space InputArray(0) = 06/16/2020
Replace InputArray(0) from your input.
You remain with MARK LATIN TOYOTA COMPANY XLS
Get the index of Company which will be 4
then under the assumption that before COMPANY word you will have its name which we have to skip
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.
Jelrey
(Mohamed Salutin)
August 27, 2020, 12:59pm
3
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
Manish540
(Manish Shettigar)
August 27, 2020, 1:09pm
4
Check the attached workflow @Jelrey ,
Regex_Extraction.xaml (6.2 KB)
Hope this may help you
Jelrey
(Mohamed Salutin)
August 27, 2020, 1:21pm
5
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
Jelrey
(Mohamed Salutin)
August 27, 2020, 1:22pm
6
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
(Manish Shettigar)
August 27, 2020, 1:57pm
8
Check this below updated workflow, @Jelrey
Regex_Extraction.xaml (7.5 KB)
Sorry for the delay
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.
Jelrey
(Mohamed Salutin)
August 27, 2020, 2:43pm
9
@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 :-
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET.
Happy Automation
Best Regards
Er Pratik Wavhal
system
(system)
Closed
August 31, 2020, 6:22am
12
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.