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

	<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>2001-09-28T20:08:00-04:00</updated>

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

		<entry>
		<author><name><![CDATA[Petersen]]></name></author>
		<updated>2001-09-28T20:08:00-04:00</updated>

		<published>2001-09-28T20:08:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=113#p113</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=113#p113"/>
		<title type="html"><![CDATA[Regsubbing]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=113#p113"><![CDATA[
personally i just like to write a proc for such things<br><br>eg<br><div class="codebox"><p>Code: </p><pre><code>proc myregsub {a} {regsub -all 1 $a one a regsub -all 2 $a two areturn a}</code></pre></div>can then just regsub a string by doing [myregsub $blah] etc<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=60">Petersen</a> — Fri Sep 28, 2001 8:08 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-09-28T15:44:00-04:00</updated>

		<published>2001-09-28T15:44:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=105#p105</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=105#p105"/>
		<title type="html"><![CDATA[Regsubbing]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=105#p105"><![CDATA[
Hmm, thanks a lot.<br>My intention was to reduce the amount of regsubs by putting them all into one, but as it seems, it doesn't work. Anyway your solution is very interesting from a genral point of view. Thanks !<br><br>Baerchen<p>Statistics: Posted by Guest — Fri Sep 28, 2001 3:44 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[stdragon]]></name></author>
		<updated>2001-09-26T22:25:00-04:00</updated>

		<published>2001-09-26T22:25:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=45#p45</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=45#p45"/>
		<title type="html"><![CDATA[Regsubbing]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=45#p45"><![CDATA[
You could do it with one regsub and a subst. It's probably better to just do 2 regsubs though <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":)" title="Smile"><br><br>set str "this is 1 test of 2 things"<br>set keys(1) one<br>set keys(2) two<br>regsub -all 1|2 $str {${keys(&amp;)}} str<br>set str [subst $str]<br><br>Just make sure your source string doesn't have special characters in it <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=8">stdragon</a> — Wed Sep 26, 2001 10:25 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Anonymous]]></name></author>
		<updated>2001-09-26T04:26:00-04:00</updated>

		<published>2001-09-26T04:26:00-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=28#p28</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=28#p28"/>
		<title type="html"><![CDATA[Regsubbing]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=28#p28"><![CDATA[
Hi, <br><br>Is it possible to put 2 different substitutions into one regsub? Say I want to regsub "1" by "one and "2" by "two".<br><br>regsub -all 1 $a one a<br>regsub -all 2 $a two a<br><br>does the job.<br><br>Is it possible to put that into _one_ regsub ?<br><p>Statistics: Posted by Guest — Wed Sep 26, 2001 4:26 am</p><hr />
]]></content>
	</entry>
	</feed>
