Skip to main content
Solved

Remove space between numbers and letter in a column


arash_hokm
Contributor
Forum|alt.badge.img+8

I have a mix column that contains numbers and letters. in some records the first value or two first values ​​are number and then is a space then comes letter. the space und letter don't appear in all records. if a record contains this space I want to remove the space between number and letter.

For example : 2 a -> 2a oder 22 a -> 22a.

 

 

 

Best answer by ebygomm

This regex will match any space preceded by a number and followed by a letter. 

(?<=\d)\s(?=[a-zA-Z])

If you use it in a StringReplacer with ReplacementText of nothing you should get the result you are after

 

View original
Did this help you find an answer to your question?

2 replies

ebygomm
Influencer
Forum|alt.badge.img+32
  • Influencer
  • Best Answer
  • October 21, 2022

This regex will match any space preceded by a number and followed by a letter. 

(?<=\d)\s(?=[a-zA-Z])

If you use it in a StringReplacer with ReplacementText of nothing you should get the result you are after

 


arash_hokm
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • October 21, 2022
ebygomm wrote:

This regex will match any space preceded by a number and followed by a letter. 

(?<=\d)\s(?=[a-zA-Z])

If you use it in a StringReplacer with ReplacementText of nothing you should get the result you are after

 

Thanks alot 🙂


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings