Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Pulkit_Thukral
Partner - Creator II
Partner - Creator II

Replacing substring with Some Character

Hi ,

I have a requirement of replacing a String Field Substring.

Example.

Input Row - "AEJGASHDFN2K"

I want Output as - "AExxxxxxxxx2K"

I just want First 2 letters and last 2 letters to be shown ,rest all "X".

NOTE: The length of string would be dynamic. hence cannot set hard coded values.

1 Solution

Accepted Solutions
marcus_sommer

Try: left([Input Row], 2) & repeat('x', len([Input Row]) - 4) & right([Input Row], 2)

- Marcus

View solution in original post

2 Replies
marcus_sommer

Try: left([Input Row], 2) & repeat('x', len([Input Row]) - 4) & right([Input Row], 2)

- Marcus

Not applicable

=mid('AEJGASHDFN2K',1,2) & REPEAT('x', len('AEJGASHDFN2K')-4) &

right('AEJGASHDFN2K',2)

Put this in a text box and test.