<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/18046" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2010-10-05T12:01:21-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/18046</id>

		<entry>
		<author><name><![CDATA[spithash]]></name></author>
		<updated>2010-10-05T10:38:31-04:00</updated>

		<published>2010-10-05T10:38:31-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94649#p94649</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94649#p94649"/>
		<title type="html"><![CDATA[substitute.tcl v1.0, sed-style text substitution (s/foo/bar)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94649#p94649"><![CDATA[
It's awesome, I use it  all the time <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=9145">spithash</a> — Tue Oct 05, 2010 10:38 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Pixelz]]></name></author>
		<updated>2010-10-05T12:01:21-04:00</updated>

		<published>2010-10-01T05:28:49-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=94593#p94593</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=94593#p94593"/>
		<title type="html"><![CDATA[substitute.tcl v1.0, sed-style text substitution (s/foo/bar)]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=94593#p94593"><![CDATA[
This script provides sed style text subsitution, with full regular expression support. Use ".chanset #chan +substitute" to enable the script in a channel.<br><br>Notes:<br>    Flags (i.e. global, case-insensitive) aren't supported directly in the syntax, however Tcl metasyntax can still be used. Expressions default to global/all, case-sensitive. Note that it's not possible to turn on or off global matching via metasyntax, this is because of a limitation in Tcl.<br><br>Usage examples:<blockquote class="uncited"><div>Basic usage<br>&lt;nick&gt; Hello, World!<br>&lt;nick&gt; s/World/Everyone<br>&lt;bot&gt; Nick meant: "Hello, Everyone!"</div></blockquote><blockquote class="uncited"><div>With : instead of /<br>&lt;nick&gt; Hello, World!<br>&lt;nick&gt; s:World:Everyone<br>&lt;bot&gt; Nick meant: "Hello, Everyone!"</div></blockquote><blockquote class="uncited"><div>Removing text<br>&lt;nick&gt; Hello, World!<br>&lt;nick&gt; s/,/<br>&lt;bot&gt; Nick meant: "Hello World!"</div></blockquote><blockquote class="uncited"><div>Substitutions can be stacked indefinately<br>&lt;nick&gt; Hello, World!<br>&lt;nick&gt; s/l/w/s/o/u<br>&lt;bot&gt; Nick meant: "Hewwu, Wurwd!"</div></blockquote><blockquote class="uncited"><div>You can keep stacking over multiple messages<br>&lt;nick&gt; Hello, World!<br>&lt;nick&gt; s/World/Everyone<br>&lt;bot&gt; Nick meant: "Hello, Everyone!"<br>&lt;nick&gt; s/Everyone/Friday<br>&lt;bot&gt; Nick meant: "Hello, Friday!"</div></blockquote><blockquote class="uncited"><div>Regular expression<br>&lt;nick&gt; Hello, World!<br>&lt;nick&gt; s/[A-Z]/Y<br>&lt;bot&gt; Nick meant: "Yello, Yorld!"</div></blockquote><blockquote class="uncited"><div>More regular expression<br>&lt;nick&gt; Hello, World!<br>&lt;nick&gt; s/\S/x<br>&lt;bot&gt; Nick meant: "xxxxxx xxxxxx"</div></blockquote><blockquote class="uncited"><div>Metasyntax in action, turning on case insensitive matching:<br>&lt;nick&gt; Aaa Bbb<br>&lt;nick&gt; s/(?i)a/x/s/(?i)b/y<br>&lt;bot&gt; Nick meant: "xxx yyy"</div></blockquote><blockquote class="uncited"><div>Substitution guru:<br>&lt;nick&gt; :p<br>&lt;nick&gt; s/:/abc/s/p/defg/s/[ce]/^/s/d/o/s/a/\/s:g:/:s/b/(/s/f/)<br>&lt;bot&gt; Nick meant: "\(^o^)/"</div></blockquote>Download: <a href="http://code.google.com/p/pixelz-tcl/downloads/detail?name=substitute-1.0.tcl" class="postlink">substitute-1.0.tcl</a><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6356">Pixelz</a> — Fri Oct 01, 2010 5:28 am</p><hr />
]]></content>
	</entry>
	</feed>
