Processing Ajax...

Title

Message

Confirm

Confirm

Confirm

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure you want to delete this item?

Confirm

Are you sure?

Remove Extra White Spaces and Trim

Description
This macro will remove double-spaces and trim white space from the beginning and end of the copied text.
Language
C#.net
Minimum Version
Created By
Yasutaka Ito
Contributors
-
Date Created
Aug 19, 2014
Date Last Modified
Aug 19, 2014

Macro Code

using System;
using System.Text.RegularExpressions;

public static class ClipboardFusionHelper
  {
    public static string ProcessText(string text)
      {
         Regex regex = new Regex(@" {2,}");
         return regex.Replace(text, " ").Trim();
      }
  }