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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,591)