Dynamic data import / export

datenbank

simply more productive
Up to 100,000 records can be processed with the freeware version!
Welcome, Guest
Username: Password: Remember me
Welcome to the FlowHeater support forum.

Questions about using FlowHeater are answered here.
  • Page:
  • 1

TOPIC: Removing spaces in string

Removing spaces in string 9 months 1 week ago #3073

  • Joe
  • Joe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
I am new at this, so I'm sure this is a simple task...

I have a string that may have multiple extra spaces between words: "St Louis, MO" or "St Louis, MO" or "St Louis, MO".

In all cases I want to return only one space between each word. "St Louis, MO"

How can I do this?

Please Log in or Create an account to join the conversation.

Removing spaces in string 9 months 1 week ago #3074

  • FlowHeater-Team
  • FlowHeater-Team's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 275
Hi Joe,

To remove spaces in as string you have to use the String Replace Heater with enabled extended settings. (see screenshot below)

In the extended settings you can specify a replace list like this

5 time space,1 space
4 time space,1 space
3 time space,1 space
2 time spcae,1 space

When you disable the option “Termnate list processing after first match” the String Replace Heater loops over all entries and tries to remove first 5 spaces with one, after that 4 spaces with one till end of the list. At the end all spaces are remove and no repeated spaces should occur in the string.

In the attachment you´ll find a simple example how it works.



File Attachment:

File Name: remove-spaces.zip
File Size: 2 KB
Attachments:

Please Log in or Create an account to join the conversation.

Best wishes
Robert Stark

Did this answer your question? We would be grateful if you provide a brief comment as feedback. It may also help others who may have encountered a similar problem.
Last Edit: by FlowHeater-Team.

Removing spaces in string 9 months 1 week ago #3076

  • Joe
  • Joe's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 25
That works great. Thank you!

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Moderators: FlowHeater-Team
Time to create page: 0.264 seconds