cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mick282
Helper III
Helper III

How to Remove tab spacing...

Hi all,

 

So I'm stuck. I've got a array variable that contains a list of special characters that I'll apply to each and remove from a string by using the replace() expression and looping through the array. I've now come across a speed bump... I noticed some of the strings contain tab spacing. So not just normal spacing but tab spacing.

 

I tried adding into my array things like '\t' or just entering tab to replace it with null but it's not working. The tab spacing is still there. Any way of replacing tab spacing?

 

The annoying tab spacing. You can't see it in the string but it's there in the raw output.The annoying tab spacing. You can't see it in the string but it's there in the raw output.

1 ACCEPTED SOLUTION

Accepted Solutions
v-litu-msft
Community Support
Community Support

Hi @Mick282,

 

Cause Unicode of "tab" is 9, uniform resource identifier is %09, so you could use uriComponent function to encode the string, then use replace function to remove these "%09" in the encoded string, then use decodeUriComponent function decode it, then it will return the string that has no tab:

decodeUriComponent(replace(uriComponent(outputs('Get_file_content_using_path')?['body']),'%09',''))

Screenshot 2021-04-16 143518.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Achavan
Resolver II
Resolver II

Hi @Mick282 ,

try this

Achavan_0-1618554472938.png

output -

Achavan_1-1618554509439.png

 

v-litu-msft
Community Support
Community Support

Hi @Mick282,

 

Cause Unicode of "tab" is 9, uniform resource identifier is %09, so you could use uriComponent function to encode the string, then use replace function to remove these "%09" in the encoded string, then use decodeUriComponent function decode it, then it will return the string that has no tab:

decodeUriComponent(replace(uriComponent(outputs('Get_file_content_using_path')?['body']),'%09',''))

Screenshot 2021-04-16 143518.jpg

 

Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (1,633)