<?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/16105" />

	<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>2008-08-31T23:03:51-04:00</updated>

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

		<entry>
		<author><name><![CDATA[garung]]></name></author>
		<updated>2008-08-31T23:03:51-04:00</updated>

		<published>2008-08-31T23:03:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84991#p84991</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84991#p84991"/>
		<title type="html"><![CDATA[regexp question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84991#p84991"><![CDATA[
You're so cool! thanks speechles <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6898">garung</a> — Sun Aug 31, 2008 11:03 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-08-31T19:02:24-04:00</updated>

		<published>2008-08-31T19:02:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84989#p84989</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84989#p84989"/>
		<title type="html"><![CDATA[regexp question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84989#p84989"><![CDATA[
<blockquote class="uncited"><div>speechless, it's tnot that, i mean skip these words(he's she's it's) so that they dont replace them with asterisks</div></blockquote><div class="codebox"><p>Code: </p><pre><code>&lt;speechles&gt; .tcl set a [asterize "this, is a word. this is a question?"]&lt;bot&gt; Tcl: ****, ** * ****. **** ** * ********?&lt;speechles&gt; .tcl set a [asterize "he's got this. she's got that. you've got those."]&lt;bot&gt; Tcl: **'* *** ****. ***'* *** ****. ***'** *** *****.</code></pre></div><div class="codebox"><p>Code: </p><pre><code>proc asterize {text} {   set asterisktext ""   foreach word [split $text] {      set asteriskword ""      foreach char [split $word ""] {         if {[string match *$char* "`~!@#$%^&amp;()\[\]\{\}:;'"&lt;&gt;\?,."]} {            append asteriskword $char         } else {            append asteriskword "*"         }      }      append asterisktext "$asteriskword "   }   return [string trim $asterisktext]}</code></pre></div>You mean like this?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Aug 31, 2008 7:02 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[garung]]></name></author>
		<updated>2008-08-31T17:12:16-04:00</updated>

		<published>2008-08-31T17:12:16-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84979#p84979</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84979#p84979"/>
		<title type="html"><![CDATA[regexp question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84979#p84979"><![CDATA[
speechless, it's tnot that, i mean skip these words(he's she's it's) so that they dont replace them with asterisks<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6898">garung</a> — Sun Aug 31, 2008 5:12 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[speechles]]></name></author>
		<updated>2008-08-31T16:06:00-04:00</updated>

		<published>2008-08-31T16:06:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84974#p84974</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84974#p84974"/>
		<title type="html"><![CDATA[regexp question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84974#p84974"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>&lt;speechles&gt; .tcl set a "I'll . it's , she's ..."&lt;bot&gt; Tcl: I'll . it's , she's ...&lt;speechles&gt; .tcl set b [string map {"." "" "?" "" "," ""} $a]&lt;bot&gt; Tcl: I'll  it's  she's&lt;speechles&gt; .tcl set c [join [split $b]]&lt;bot&gt; Tcl: I'll it's she's</code></pre></div>Like that? Part c, the join and split is there to eliminate over spaced fields and return to the string to nomal single spaces.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=8138">speechles</a> — Sun Aug 31, 2008 4:06 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[garung]]></name></author>
		<updated>2008-08-31T13:11:10-04:00</updated>

		<published>2008-08-31T13:11:10-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=84969#p84969</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=84969#p84969"/>
		<title type="html"><![CDATA[regexp question]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=84969#p84969"><![CDATA[
Can someone help me how to skip word like I'll . it's , she's ... in $text? thanks<br><br> while {[regexp -indices -start $pos {[^[:punct:]\s]+} $text match]} {<br>    lappend words $match<br>    lassign $match -&gt; pos<br>    incr pos<br>  }<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6898">garung</a> — Sun Aug 31, 2008 1:11 pm</p><hr />
]]></content>
	</entry>
	</feed>
