I have a string
No.: 366173459
issued: July/14/2011
expires: July/13/2021
P<USALAROCCA<<MARJORY<<<<<<<<<<<<<<<<<<<<<<<
3661734598USA9309124F2107131476790629<020890
I need to extract the number 9309124F2107131476790629 which is in between USA and < sign.
Please help.
Thanks!
@divya.chopra In the data there are two matches that match the pattern that you are looking for. Do you always want the last occurrence of that pattern? Will the data that you want be always present in the last?
divya.chopra:
USALAROCCA<<MARJORY<
Hi @divya.chopra
Just asking Some Que before the solution
Is your below text is in Single line or seperate line ?? :-
The Number you want to Extract gonna be of same length ??
If both of the above que’s answers are “YES” then below is the regex for the same in 2 ways :-
Way 1 :-
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET.
Way 2 :-
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET.
Mark as solution and like it if this helps you
Happy Automation
Best Regards
Er Pratik Wavhal
1 Like
Yes the data was always be present in the last
@divya.chopra Check this Workflow :
RegexFind.zip (1.5 KB)
It uses the Regex Option RightToLeft which takes the matching values from the Last Match.
Check the workflow with different Inputs that you have.
Check this Link. You can verify your data in here as well. Although the regex matches two Strings the Last Match is returned as the Output.
Regular expression tester with syntax highlighting, explanation, cheat sheet for PHP/PCRE, Python, GO, JavaScript, Java, C#/.NET.
1 Like
system
(system)
Closed
July 29, 2020, 5:52pm
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.