Skip to main content
Solved

How do I remove white spaces before and after a "/"?


Forum|alt.badge.img

Hello,

I am working with an excel file with lots of field where I want to remove the space before and after a "/" eg. HWY 427 / North Queen St to HWY 427/North Queen St.

I have been testing using the String Replacer where Text to replace: is ([A-Z])([A-Z]).

Does anyone else have any suggestions?

Thanks in advance.

Best answer by takashi

Hi @1011analyst, try setting these parameters to the StringReplacer.

  • Mode: Replace Regular Expression
  • Text to Replace: \\s*/ \\s*
  • Replacement Text: /
View original
Did this help you find an answer to your question?

2 replies

takashi
Influencer
  • Best Answer
  • November 1, 2017

Hi @1011analyst, try setting these parameters to the StringReplacer.

  • Mode: Replace Regular Expression
  • Text to Replace: \\s*/ \\s*
  • Replacement Text: /

erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • November 1, 2017

HI @1011analyst,

Even though I believe @takashi has the better answer, this will also work:

I tried 2 StringReplacers (first replacing " /" with "/", second replacing "/ " with "/") as text replacement.


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