Issue while using Get Visible Text activity to capture the Mainframe screen

While using Get Visible Text activity to capture the Mainframe screen, space gets truncated between middle and last name. It happens only for some naming patterns and only while capturing Mainframe screen. Any advise would be greatly appreciated. Please find my attachment for an example.

Output for truncation of space between middle and last name:

   Name: WILLIAMS, BRIAN_________________  NmCd: IN 		     

_ Name: WILLIAMS, BRIAN Sex: M Ht: 6 2
NmCd: IN Race: B Wt: 230
DOB: 10/14/1964

_ Name: WILLIAMS, BRIANA Sex: M Ht: 5 6
NmCd: IN Race: W Wt: 160
DOB: 01/06/1955

_ Name: WILLIAMS, BRIANAARON Sex: M Ht: 5 4
NmCd: IN True name Race: B Wt: 170
DOB: 01/03/1988 Phy Desc: CCN:1833301/

_ Name: WILLIAMS, BRIANALLEN Sex: M Ht: 5 8
NmCd: IN Race: W Wt: 170
DOB: 02/08/1988 Phy Desc: SCAR (L) FOREARM SCAR (R) INSIDE

Correct Result:

DG1051MI Name Duplicate (NMD) STATEWIDE COURT DB2P PUB 3 of 3
SNCI Case: _________ ___ __ StID: _ ____________ __
Name: WILLIAMS, AARON_________________ NmCd: IN

_ Name: WILLIAMS, AARON III Sex: M Ht: 5 9
NmCd: IN Race: W Wt: 145
DOB: 04/24/1979

_ Name: WILLIAMS, AARON ANDREW Sex: M Ht: 5 9
NmCd: IN Race: W Wt: 145
DOB: 08/27/1994

_ Name: WILLIAMS, AARON BRYAN Sex: M Ht: 5 6
NmCd: IN Race: U Wt: 136
DOB: 02/16/1977

_ Name: WILLIAMS, AARON CHARLES Sex: M Ht: 6 3
NmCd: IN Race: U Wt: 175
DOB: 11/01/1995

Hello @Frank_Antony1 and welcome to the UiPath Forums community! :partying_face:

Have you thought about cleaning your string after this step. This would make sure those large spaces are removed.

You could use a Replace activity with the pattern: “\s{2,}” and replaced with “ “.

This would replace all spaces of 2 or greater with a single space. (Which is what you want to achieve I think).

Hopefully this helps and welcome again to the community :slight_smile: