<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: A Way to Automate &#8220;Regular&#8221; Renaming</title>
	<atom:link href="http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/</link>
	<description>Loren Shure works on design of the MATLAB language at MathWorks. She writes here about once a week on MATLAB programming and related topics.</description>
	<lastBuildDate>Wed, 15 Feb 2012 15:23:22 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-29709</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Wed, 20 Aug 2008 10:17:51 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-29709</guid>
		<description>Vijay-

I would loop through the replacement strings myself.  Not sure if there&#039;s a regexp way to do it.

--Loren</description>
		<content:encoded><![CDATA[<p>Vijay-</p>
<p>I would loop through the replacement strings myself.  Not sure if there&#8217;s a regexp way to do it.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vijay</title>
		<link>http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-29706</link>
		<dc:creator>Vijay</dc:creator>
		<pubDate>Tue, 19 Aug 2008 21:34:21 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-29706</guid>
		<description>Loren - Assume i want to replace ocurrences of &#039;Monday&#039;, &#039;Tuesday&#039;, &#039;Wednesday&#039;, in a string with &#039;mon&#039;, &#039;tue&#039;, &#039;wed&#039; respectively.  Can this be done with one or two lines of code? I am currently using case statements.</description>
		<content:encoded><![CDATA[<p>Loren &#8211; Assume i want to replace ocurrences of &#8216;Monday&#8217;, &#8216;Tuesday&#8217;, &#8216;Wednesday&#8217;, in a string with &#8216;mon&#8217;, &#8216;tue&#8217;, &#8216;wed&#8217; respectively.  Can this be done with one or two lines of code? I am currently using case statements.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gordon Saksena</title>
		<link>http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-28355</link>
		<dc:creator>Gordon Saksena</dc:creator>
		<pubDate>Fri, 18 Apr 2008 15:13:47 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-28355</guid>
		<description>Though I had fiddled with regular expressions before, they really clicked after reading the first part of &quot;Mastering Regular Expressions&quot; by Jeffrey Friedl.  He explains what regular expression engines do internally, which helped me organize the myriad of special regexp symbols and gave me an intuition into what is possible.</description>
		<content:encoded><![CDATA[<p>Though I had fiddled with regular expressions before, they really clicked after reading the first part of &#8220;Mastering Regular Expressions&#8221; by Jeffrey Friedl.  He explains what regular expression engines do internally, which helped me organize the myriad of special regexp symbols and gave me an intuition into what is possible.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Francois</title>
		<link>http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-28075</link>
		<dc:creator>Francois</dc:creator>
		<pubDate>Mon, 31 Mar 2008 13:04:09 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-28075</guid>
		<description>I agree, regular expression should be part of the training for programmers or any relevant disciplines.</description>
		<content:encoded><![CDATA[<p>I agree, regular expression should be part of the training for programmers or any relevant disciplines.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27891</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Fri, 28 Mar 2008 21:37:53 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27891</guid>
		<description>Scott-

Indeed yes, train with examples.  That&#039;s the holy grail.

--Loren</description>
		<content:encoded><![CDATA[<p>Scott-</p>
<p>Indeed yes, train with examples.  That&#8217;s the holy grail.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Loren</title>
		<link>http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27890</link>
		<dc:creator>Loren</dc:creator>
		<pubDate>Fri, 28 Mar 2008 21:12:41 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27890</guid>
		<description>Scott-

In &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_prog/f0-39483.html&quot; rel=&quot;nofollow&quot;&gt;this part of the doc&lt;/a&gt; under &quot;Using Arrays as Indices&quot;, you will see you can loop over the columns of any kind of array, not just a row vector of numbers.  MATLAB has behaved like that from the inception.

--Loren</description>
		<content:encoded><![CDATA[<p>Scott-</p>
<p>In <a href="http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_prog/f0-39483.html" rel="nofollow">this part of the doc</a> under &#8220;Using Arrays as Indices&#8221;, you will see you can loop over the columns of any kind of array, not just a row vector of numbers.  MATLAB has behaved like that from the inception.</p>
<p>&#8211;Loren</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Miller</title>
		<link>http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27889</link>
		<dc:creator>Scott Miller</dc:creator>
		<pubDate>Fri, 28 Mar 2008 21:09:28 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27889</guid>
		<description>Loren,

Having now tried the latest version of regExpHelper, I find that it is better than the initial release.  There is enough in the comment lines to sort out how to use it, and I was able to get a part of your regexp code to run: 
&#039;_+(\w?)&#039;.  That alone is potentially a great help.

A *usable* tool is certainly available in the form of regExpHelper.  Now if only it could learn from examples...

Scott</description>
		<content:encoded><![CDATA[<p>Loren,</p>
<p>Having now tried the latest version of regExpHelper, I find that it is better than the initial release.  There is enough in the comment lines to sort out how to use it, and I was able to get a part of your regexp code to run:<br />
&#8216;_+(\w?)&#8217;.  That alone is potentially a great help.</p>
<p>A *usable* tool is certainly available in the form of regExpHelper.  Now if only it could learn from examples&#8230;</p>
<p>Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Miller</title>
		<link>http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27888</link>
		<dc:creator>Scott Miller</dc:creator>
		<pubDate>Fri, 28 Mar 2008 20:56:50 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27888</guid>
		<description>Loren,

A nice little piece.  Once again, I find I learn the most about programming by reading OPC (Other People&#039;s Code!).  In this case, &#039;type&#039; doesn&#039;t appear as a keyword when I do a search, but it works.  

Confronted with this problem, I would think &quot;regexp&quot;, then struggle with the rules for a while until I got a solution, perhaps consulting with a C/C++ colleague down the hall, and perhaps looking at some other code in FEX.  It is a shame that there isn&#039;t a usable tool to help with this problem - see my comments on 

http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15215&amp;objectType=file

which appears to be a foray in the right direction.

The ability to loop &#039;for&#039; over a list, as in &#039;for name = names&#039; isn&#039;t described in the TMW documentation either.  Since the latter structure appears in some languages, I had previously tried this construction, but found that it works for some instances and not others.  Having said that, I have just tried to get it to fail, and can&#039;t do it.  Since the documentation doesn&#039;t describe this usage, could you go over the allowed syntax?

Scott</description>
		<content:encoded><![CDATA[<p>Loren,</p>
<p>A nice little piece.  Once again, I find I learn the most about programming by reading OPC (Other People&#8217;s Code!).  In this case, &#8216;type&#8217; doesn&#8217;t appear as a keyword when I do a search, but it works.  </p>
<p>Confronted with this problem, I would think &#8220;regexp&#8221;, then struggle with the rules for a while until I got a solution, perhaps consulting with a C/C++ colleague down the hall, and perhaps looking at some other code in FEX.  It is a shame that there isn&#8217;t a usable tool to help with this problem &#8211; see my comments on </p>
<p><a href="http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15215&#038;objectType=file" rel="nofollow">http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=15215&#038;objectType=file</a></p>
<p>which appears to be a foray in the right direction.</p>
<p>The ability to loop &#8216;for&#8217; over a list, as in &#8216;for name = names&#8217; isn&#8217;t described in the TMW documentation either.  Since the latter structure appears in some languages, I had previously tried this construction, but found that it works for some instances and not others.  Having said that, I have just tried to get it to fail, and can&#8217;t do it.  Since the documentation doesn&#8217;t describe this usage, could you go over the allowed syntax?</p>
<p>Scott</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Antunes</title>
		<link>http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27885</link>
		<dc:creator>Antunes</dc:creator>
		<pubDate>Fri, 28 Mar 2008 18:15:39 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27885</guid>
		<description>Regular expressions are great -this was the reason why I learned PERL. I use Matlab most of the time and would prefer to use regexps without leaving my favorite tool. However, I am not aware of any book discussing regexps in Matlab.

So here&#039;s a request: a Matlab book on string parsing with regexps oriented to  scientific problems (bioinformatics, text mining, etc.). This is much needed.

Antunes</description>
		<content:encoded><![CDATA[<p>Regular expressions are great -this was the reason why I learned PERL. I use Matlab most of the time and would prefer to use regexps without leaving my favorite tool. However, I am not aware of any book discussing regexps in Matlab.</p>
<p>So here&#8217;s a request: a Matlab book on string parsing with regexps oriented to  scientific problems (bioinformatics, text mining, etc.). This is much needed.</p>
<p>Antunes</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graeme E. Smith</title>
		<link>http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27882</link>
		<dc:creator>Graeme E. Smith</dc:creator>
		<pubDate>Fri, 28 Mar 2008 16:37:01 +0000</pubDate>
		<guid isPermaLink="false">http://blogs.mathworks.com/loren/2008/03/27/a-way-to-automate-regular-renaming/#comment-27882</guid>
		<description>I think the regular expression is one of those: if-you-know-how-to-use-it-more-power-to-you type features.  I had a little experience using them some years ago: on the one hand, when they worked they were incredible; but on the other hand when they didn&#039;t work I found them a nightmare to debug.  I think it&#039;s well worth remember that they&#039;re available in Matlab, but like many features of computing, unless you have cause to use them on a regular basis it&#039;s unlikely you&#039;ll become a master.</description>
		<content:encoded><![CDATA[<p>I think the regular expression is one of those: if-you-know-how-to-use-it-more-power-to-you type features.  I had a little experience using them some years ago: on the one hand, when they worked they were incredible; but on the other hand when they didn&#8217;t work I found them a nightmare to debug.  I think it&#8217;s well worth remember that they&#8217;re available in Matlab, but like many features of computing, unless you have cause to use them on a regular basis it&#8217;s unlikely you&#8217;ll become a master.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

