Showing results for 
Search instead for 
Do you mean 
Reply

Search for blanks and remove them from a String

Greetings Members,

 

I have a table copied from an ERP system. The issue is that Part number / Part Name strings have few blank  spaces before and after the string. I need to delete them in PS only. eg input is " ABCD123 "...Out put should be "ABCD123". 

 

Thanks in Advance.

 

Aravind

3 REPLIES

Re: Search for blanks and remove them from a String

You can use the function trim to cut off all leading and trailing whitespace (including spaces, tabs, line breaks).

Re: Search for blanks and remove them from a String

Hello MichaelJoos,

 

Thanks for the help. It works!!

 

Aravind

Re: Search for blanks and remove them from a String

[ Edited ]

Or if you want to ensure all blanks removed, a method like this could also work:

 

 loop.png

This will print "Iamsoboredrightnow"