Skip to main content
Solved

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

  • November 1, 2017
  • 2 replies
  • 39 views

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: /
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

takashi
Celebrity
  • 7843 replies
  • 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+22
  • Contributor
  • 2179 replies
  • 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.