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?

Strip Non-Printable Characters

Description
Replaces any character not in the ASCII range of (space) to (tilde) with a hyphen.
Language
C#.net
Minimum Version
Created By
Andrew Kvochick99220
Contributors
-
Date Created
May 1, 2019
Date Last Modified
May 1, 2019

Macro Code

using System;
using System.Collections.Generic;
using System.Text.RegularExpressions;

// The 'text' parameter will contain the text from the:
//   - Current Clipboard when run by HotKey
//   - History Item when run from the History Menu
// The returned string will be:
//   - Placed directly on the Clipboard
//   - Ignored by ClipboardFusion if it is 'null'
public static class ClipboardFusionHelper
{
	public static string ProcessText(string text)
	{
		text = Regex.Replace(text, "[^ -~]", "-");
		return text;
	}
}