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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

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

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,674)