<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:media="http://search.yahoo.com/mrss/">
<channel>
<title>ClipboardFusion RSS: problem with macro and regex</title>
<atom:link href="https://www.clipboardfusion.com/Discussions/RSS/?TopicID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f" rel="self" type="application/rss+xml" />
<link>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f</link>
<description>ClipboardFusion RSS: problem with macro and regex</description>
<lastBuildDate>Wed, 13 May 2026 02:21:01 GMT</lastBuildDate>
<language>en</language>
<sy:updatePeriod>hourly</sy:updatePeriod>
<sy:updateFrequency>1</sy:updateFrequency>
<generator>https://www.clipboardfusion.com/Discussions/RSS/?TopicID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f</generator>
<item>
<title>RE: problem with macro and regex</title>
<link>https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f#6</link>
<pubDate>Fri, 16 Oct 2020 18:50:41 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f#6</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Haha, no worries!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Haha, no worries!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: problem with macro and regex</title>
<link>https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f#5</link>
<pubDate>Fri, 16 Oct 2020 16:04:16 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f#5</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Thank you very much
it works perfectly
i would have never thought of that much escaping!]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Thank you very much<br/>
it works perfectly<br/>
i would have never thought of that much escaping!<img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/face-laugh-beam.light.svg" alt=":laugh:" style="box-sizing:border-box;position:relative;overflow:hidden;vertical-align:middle !important;width:16px;height:16px;" HelpButtonData=":laugh:" HelpButtonDataAlign="BelowMiddle" />
</div>
]]></content:encoded>
</item>
<item>
<title>RE: problem with macro and regex</title>
<link>https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f#4</link>
<pubDate>Fri, 16 Oct 2020 15:45:00 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f#4</guid>
<category>ClipboardFusion</category>
<description><![CDATA[Ah, it's treating the quotation mark in the middle of that regex statement as the end of that parameter. You need to escape it with a backslash, like this:
"[\\/:\"*?&lt;&gt;|]"
If those two backslashes are literal as well, you need to escape each one as well, so it would be like this:
"[\\\\/...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
Ah, it's treating the quotation mark in the middle of that regex statement as the end of that parameter. You need to escape it with a backslash, like this:<br/>
<br/>
<div class="Inline"><pre>"[\\/:\"*?&lt;&gt;|]"</pre></div><br/>
<br/>
If those two backslashes are literal as well, you need to escape each one as well, so it would be like this:<br/>
<br/>
<div class="Inline"><pre>"[\\\\/:\"*?&lt;&gt;|]"</pre></div><br/>
<br/>
When you do \\ inside the quoted parameter, it's treated as one backslash. And when you do \" inside the quoted parameter, it's treated as just ".<br/>
<br/>
Hope that makes sense!
</div>
]]></content:encoded>
</item>
<item>
<title>RE: problem with macro and regex</title>
<link>https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f#3</link>
<pubDate>Thu, 15 Oct 2020 16:57:19 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f#3</guid>
<category>ClipboardFusion</category>
<description><![CDATA[]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
<div class="Image"><a href="https://i.postimg.cc/sXGy7MWz/Untitled-2.jpg" target="_blank" data-fancybox="" data-caption="https://i.postimg.cc/sXGy7MWz/Untitled-2.jpg" HelpButtonData="https://i.postimg.cc/sXGy7MWz/Untitled-2.jpg" HelpButtonDataAlign="BelowMiddle"><img src="https://i.postimg.cc/sXGy7MWz/Untitled-2.jpg" alt="https://i.postimg.cc/sXGy7MWz/Untitled-2.jpg" title=""></a></div>
</div>
]]></content:encoded>
</item>
<item>
<title>RE: problem with macro and regex</title>
<link>https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f#2</link>
<pubDate>Thu, 15 Oct 2020 01:06:24 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f#2</guid>
<category>ClipboardFusion</category>
<description><![CDATA[You can use text= BFS.Clipboard.CopyText();
to have the macro grab the currently highlighted text.
As for this regex statement: [\\/:"*?&lt;&gt;|]
. What doesn't work about it? Do you get an error? Or does the macro run but it doesn't match what you're expecting it to?]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
You can use <div class="Inline"><pre>text= BFS.Clipboard.CopyText();</pre></div> to have the macro grab the currently highlighted text.<br/>
<br/>
As for this regex statement: <div class="Inline"><pre>[\\/:"*?&lt;&gt;|]</pre></div>. What doesn't work about it? Do you get an error? Or does the macro run but it doesn't match what you're expecting it to?
</div>
]]></content:encoded>
</item>
<item>
<title>problem with macro and regex</title>
<link>https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f</link>
<pubDate>Thu, 08 Oct 2020 20:19:19 GMT</pubDate>
<dc:creator>Binary Fortress Software</dc:creator>
<guid isPermaLink="false">https://www.clipboardfusion.com/Discussions/View/problem-with-macro-and-regex/?ID=17d92172-a5ce-4f8c-b7dc-e17f2c7b9e4f</guid>
<category>ClipboardFusion</category>
<description><![CDATA[this is a macro i created
Code
Copy
Select All
using System;
using System.Text.RegularExpressions;
public static class ClipboardFusionHelper
{
public static string ProcessText(string text)
{
text = Regex.Replace(text, "\\n", " ");
text = Regex.Replace(text, "[^a-zA-Z0-9\u0080-\uFFFF.,%...]]></description>
<content:encoded><![CDATA[<div class="CTDiscussions">
this is a macro i created<br/>
<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e1f2334b3708bafb0a5a762a2f412" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e1f2334b3708bafb0a5a762a2f412Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e1f2334b3708bafb0a5a762a2f412Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">using System;
using System.Text.RegularExpressions;

public static class ClipboardFusionHelper
{
public static string ProcessText(string text)
{

text = Regex.Replace(text, "\\n", " ");

text = Regex.Replace(text, "[^a-zA-Z0-9\u0080-\uFFFF.,%_–-]", " ");

text = Regex.Replace(text, "(\\s+)", " ");

return text;
}
}</pre><textarea id="code019e1f2334b3708bafb0a5a762a2f412" name="code019e1f2334b3708bafb0a5a762a2f412" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div><br/>
========<br/>
<br/>
1- the macro is applied to what is already in the clipboard with the assigned (shift+ctrl+c) . how can i make it copy and then apply the function?<br/>
<br/>
2- i wanted to use this here but it give doesn't work !! <div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e1f2334b672b8ab72e33af1af353b" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e1f2334b672b8ab72e33af1af353bJs'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e1f2334b672b8ab72e33af1af353bJs" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">[\\/:"*?&lt;&gt;|]</pre><textarea id="code019e1f2334b672b8ab72e33af1af353b" name="code019e1f2334b672b8ab72e33af1af353b" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div> <br/>
<br/>
  i found the ugly that works but not really self explanatory <div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e1f2334b7724db70f0e3b1157b337" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e1f2334b7724db70f0e3b1157b337Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e1f2334b7724db70f0e3b1157b337Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">[^a-zA-Z0-9\u0080-\uFFFF.,%_–-]</pre><textarea id="code019e1f2334b7724db70f0e3b1157b337" name="code019e1f2334b7724db70f0e3b1157b337" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div> <br/>
  <br/>
 can you help modify this to work?<div class="col-md-12 BoxWrap"><div class="Box table-responsive"><a name="code" style="width:0; height:0;"></a><h2 class="TableTitle" style="border:0"><div class="TableTitleText">Code</div><div class="TitleButtons"><div class="TableTitleButton"><a href="#" onclick="return false;" data-clipboard-target="#code019e1f2334b9744cb1c0f518dbcc17f0" class="ClipboardCopyControl"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/clone.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Copy</span></a></div><div class="TableTitleButton"><a href="#" onclick="bfs.util.codeEditorSelectAll('code019e1f2334b9744cb1c0f518dbcc17f0Js'); return false;"><img src="https://www.clipboardfusion.com/MediaCommon/SVGs/FontAwesome/square-check.blue.svg" style="box-sizing:border-box;position:relative;overflow:hidden;width:auto;max-width:16px;height:16px;" /><span class="Text">Select All</span></a></div></div></h2><div class="TableTitleContent table-responsive"><div class="AceEditorWrapper" style="border-top:solid 1px var(--color-default-border);padding:0"><pre id="code019e1f2334b9744cb1c0f518dbcc17f0Js" contenteditable="true" spellcheck="true" class="skiptranslate" style="width:100%; min-height:75px;">[\\/:"*?&lt;&gt;|]</pre><textarea id="code019e1f2334b9744cb1c0f518dbcc17f0" name="code019e1f2334b9744cb1c0f518dbcc17f0" style="position:absolute; top:0; left:-999999px; width:1px; height:1px;"></textarea></div>
</div></div></div>
</div>
]]></content:encoded>
</item>
</channel>
</rss>