I want to extract data from excel file data is: the combination of numbers 21963306493155800
11959762242152400 starting of the number will be 11 or 21. number length is 17 digits and the count of digits is fixed
I have try with regex pattern ^(11|21)[0-9]{15} and [1-2]{1}[1]{1}[0-9]{15}
in the regexr.com from the ^(11|21)[0-9]{15} pattern data are highlighted when i same regex pattern using in uipath match actvity data are not get highlighted
Itās because you set Mulitline option in regex101. (m (of ā/gimā) at the end of pattern means Multiline)
Unfortunately, regex builder wizard has no option for it. Can you try check Multiline in Regex Option property?
The following regex worked fine for me to find a 17-digit number starting with 21 or 11. Note that I added \b before & after the digits because I assumed you wouldnāt want a 18+ digit found.
Thanks for the your quick reply my input file will be data from excel sheet
still not able extract data
Can pls check input file as excel file and pass the same data to regex activity and please let me the your output
Hi,
It is working with RegEx (11|21)\d{15}. I have tried with the excel that you have shared! Refer to the screenshot for the result. UiPathRegEx|690x296
I am able to extract data from the file but bot extract unwanted data too
In the Excel file, I have a bulk of data from the bulk data I want to extract only the starting of the number will be 11 or 21, and the length of the number is fixed (17)
Example : 1) 0D119460333472915000 2) 21951978287054300 3)11958358648178300 4)0D21951978287054300
Then you need to first split the extracted data with a newline, store the result in an Array, and then iterate the array with your regEx ā^(11|21)\d{15}ā, finally store the matched pattern in a new array which would be your answer.
Hope you understand the steps mentioned above.
I am able to fetch data only when Number is present in first column, Yoichi The data column posting is not fixed data can be located in the 3rd column or 8th column and so on.
Note : In the read range activity have to read Whole Input sheet.
Test with the attached sequence. I have updated the code that convert the table to text to include the whole table and modified the regular expression slightly.