Solved

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

  • 1 November 2017
  • 2 replies
  • 2 views

Badge

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.

icon

Best answer by takashi 1 November 2017, 15:40

View original

2 replies

Userlevel 2
Badge +17

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

  • Mode: Replace Regular Expression
  • Text to Replace: \\s*/ \\s*
  • Replacement Text: /
Userlevel 2
Badge +12

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.

Reply