Getting Data from Text file using regex

Hello All,

I have a file which is text and using that file I need to get the single line and the line can vary or decrease I have tried one regex method however, in that method I am getting spaces also I do not want the spaces so please any help would be appreciated

The regex which I have used is
(?<=\n\s)[a-z A-Z 0-9 . -]*a-z A-Z 0-9Input.txt (2.8 KB) output.txt (1.6 KB)
I want each line
Thanks
Happy Automation

Hello
Sorry I am unsure exactly what you want…

Are you able to paste the sample in your reply and tell us the output(bold the sample even). Any information on the pattern of the text will be helpful also.

To remove the excessive spaces you could use a replace activity and use this pattern β€œ\s{2,}” and replace with β€œβ€.

image

Cheers

Steve

1 Like

Hello I want below format

I want line by line text only and which are the space before line and text I don want

VLAANDEREN 31788446 03.00 126305 W9 D VERVANGT 02.00 126305 W9

          BRAB-LIMB.          37248770  05.00  112213  W9  D               VERVANGT         04.00  112213  W8

          CENTR. REGIO        37357585  06.00  145320  W3  D               VERVANGT         05.00  145320  W3

          WALLONIE            37413031  01.00  263948  W7  D               VERVANGT         00.00  263948  WD

          BRAB-LIMB.          37693504  04.00  112213  W3  D               VERVANGT         03.00  112213  W3

          VLAANDEREN          37697009  03.00  132510  W3  D               VERVANGT         02.00  132510  W3

          CENTR. REGIO        37738679  02.00  145320  W3  D               VERVANGT         01.00  145320  W3

          CENTR. REGIO        37742137  02.00  122195  W2  D               VERVANGT         01.00  122195  W2

          CENTR. REGIO        37744902  02.01  151420  W1 FD  V4           VERVANGT         02.00  151420  W1

          ANTWERPEN           37747252  01.00  141206  W2  D               VERVANGT         00.00  141206  WI

          VLAANDEREN          37811259  02.00  131416  W3  D               VERVANGT         01.00  131416  W1

          CENTR. REGIO        37829173  02.00  135140  W2  D               VERVANGT         01.00  135140  W2

          CENTR. REGIO        37902931  02.00  151420  W7  D               VERVANGT         01.00  151420  W7

          VLAANDEREN          37903656  00.00  142314  W1  D

          CENTR. REGIO        37932110  00.01  141629  W1 FD  V4           VERVANGT         00.00  141629  W1

          VLAANDEREN          37933007  00.01  141315  W1 FD  V4           VERVANGT         00.00  141315  W1

Hey @Chirag1991

Check out the below file. Hopefully this helps :slight_smile:

Main.xaml (8.8 KB)

Cheers

Steve

Doc1.docx (27.2 KB) Hello Steven, Due to version issue I am getting below screen
I have attached so could you share the screen shot of the same

Thanks

Hello

Make sure your packages are up to date.

Click Manage packages

Also try downloading UiPath PDF package under the official section.

Cheers

Steve