<?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: Grep Pattern Searching</title>
	<atom:link href="http://indesignsecrets.com/grep-pattern-searching.php/feed" rel="self" type="application/rss+xml" />
	<link>http://indesignsecrets.com/grep-pattern-searching.php</link>
	<description>InDesignSecrets Blog and Podcast</description>
	<lastBuildDate>Thu, 09 Feb 2012 13:22:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: JXL43</title>
		<link>http://indesignsecrets.com/grep-pattern-searching.php/comment-page-2#comment-479143</link>
		<dc:creator>JXL43</dc:creator>
		<pubDate>Thu, 22 Oct 2009 20:27:20 +0000</pubDate>
		<guid isPermaLink="false">http://indesignsecrets.com/grep-pattern-searching.php#comment-479143</guid>
		<description>For example, Cisco announced that they were canceling their global sales meeting in favor of a virtual event. ,</description>
		<content:encoded><![CDATA[<p>For example, Cisco announced that they were canceling their global sales meeting in favor of a virtual event. ,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mayanrose</title>
		<link>http://indesignsecrets.com/grep-pattern-searching.php/comment-page-2#comment-476948</link>
		<dc:creator>mayanrose</dc:creator>
		<pubDate>Mon, 03 Aug 2009 23:19:48 +0000</pubDate>
		<guid isPermaLink="false">http://indesignsecrets.com/grep-pattern-searching.php#comment-476948</guid>
		<description>ohh my so new in this! 
Thanks a lot for the other ways to solve it!!</description>
		<content:encoded><![CDATA[<p>ohh my so new in this!<br />
Thanks a lot for the other ways to solve it!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nadya Miloserdova</title>
		<link>http://indesignsecrets.com/grep-pattern-searching.php/comment-page-2#comment-474837</link>
		<dc:creator>Nadya Miloserdova</dc:creator>
		<pubDate>Mon, 13 Apr 2009 07:30:18 +0000</pubDate>
		<guid isPermaLink="false">http://indesignsecrets.com/grep-pattern-searching.php#comment-474837</guid>
		<description>@Mayanrose:
Your solution can possible be either Running headers/footers, or Paragraph Numbering, or Text Variables.

Unfortunately, it is not clear from your letter what particular part is constant or variable for each page.

Let&#039;s say you want to have such text:
&quot;Alice 13:4&quot;, where Alice is constant part, and the digits vary from page to page.
Make special paragraph numbering.
Open dialog &#039;Bullets and Numbering&#039; from Paragragh menu.
In the &#039;Number&#039; box type: Alice 13:^#
Watch the result.

Then you may want to consider using multilevel numbering as it can automate your variable &quot;13&quot; here as well.

Good luck!</description>
		<content:encoded><![CDATA[<p>@Mayanrose:<br />
Your solution can possible be either Running headers/footers, or Paragraph Numbering, or Text Variables.</p>
<p>Unfortunately, it is not clear from your letter what particular part is constant or variable for each page.</p>
<p>Let&#8217;s say you want to have such text:<br />
&#8220;Alice 13:4&#8243;, where Alice is constant part, and the digits vary from page to page.<br />
Make special paragraph numbering.<br />
Open dialog &#8216;Bullets and Numbering&#8217; from Paragragh menu.<br />
In the &#8216;Number&#8217; box type: Alice 13:^#<br />
Watch the result.</p>
<p>Then you may want to consider using multilevel numbering as it can automate your variable &#8220;13&#8243; here as well.</p>
<p>Good luck!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mayanrose</title>
		<link>http://indesignsecrets.com/grep-pattern-searching.php/comment-page-1#comment-474831</link>
		<dc:creator>mayanrose</dc:creator>
		<pubDate>Sun, 12 Apr 2009 21:54:57 +0000</pubDate>
		<guid isPermaLink="false">http://indesignsecrets.com/grep-pattern-searching.php#comment-474831</guid>
		<description>I need help! I cant figure out how to do this in a Bible:

Each page has a heading, for example: Genesis 2:3 
The Genesis is a section marker but I dont know how to put the chapter and the verse automatically so I dont have to do it manually.

At the end of the page the text finishes like this:

                      Capitulo 2
                  Dios santifica...

1 Asi fueron terminados....
2 El septimo dia....
3 Por eso Dios...

How do that in every page.....Is there a way?</description>
		<content:encoded><![CDATA[<p>I need help! I cant figure out how to do this in a Bible:</p>
<p>Each page has a heading, for example: Genesis 2:3<br />
The Genesis is a section marker but I dont know how to put the chapter and the verse automatically so I dont have to do it manually.</p>
<p>At the end of the page the text finishes like this:</p>
<p>                      Capitulo 2<br />
                  Dios santifica&#8230;</p>
<p>1 Asi fueron terminados&#8230;.<br />
2 El septimo dia&#8230;.<br />
3 Por eso Dios&#8230;</p>
<p>How do that in every page&#8230;..Is there a way?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zoheb</title>
		<link>http://indesignsecrets.com/grep-pattern-searching.php/comment-page-1#comment-474046</link>
		<dc:creator>Zoheb</dc:creator>
		<pubDate>Wed, 18 Mar 2009 13:01:41 +0000</pubDate>
		<guid isPermaLink="false">http://indesignsecrets.com/grep-pattern-searching.php#comment-474046</guid>
		<description>Brilliant! Thank you so much Nadya! I modified it slightly, i just had to add a space after the second upper.

Thanks again!</description>
		<content:encoded><![CDATA[<p>Brilliant! Thank you so much Nadya! I modified it slightly, i just had to add a space after the second upper.</p>
<p>Thanks again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nadya Miloserdova</title>
		<link>http://indesignsecrets.com/grep-pattern-searching.php/comment-page-1#comment-474043</link>
		<dc:creator>Nadya Miloserdova</dc:creator>
		<pubDate>Wed, 18 Mar 2009 12:08:29 +0000</pubDate>
		<guid isPermaLink="false">http://indesignsecrets.com/grep-pattern-searching.php#comment-474043</guid>
		<description>@Zoheb
Find What field:
(\b[[:upper:]]) (\b[[:upper:]])
Change To field:
$1$2</description>
		<content:encoded><![CDATA[<p>@Zoheb<br />
Find What field:<br />
(\b[[:upper:]]) (\b[[:upper:]])<br />
Change To field:<br />
$1$2</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zoheb</title>
		<link>http://indesignsecrets.com/grep-pattern-searching.php/comment-page-1#comment-474042</link>
		<dc:creator>Zoheb</dc:creator>
		<pubDate>Wed, 18 Mar 2009 11:58:46 +0000</pubDate>
		<guid isPermaLink="false">http://indesignsecrets.com/grep-pattern-searching.php#comment-474042</guid>
		<description>Hi all, I&#039;m trying to dlete a single space between two capital letters, and i can&#039;t! Its drving me nuts, any help would be much appreciated, here&#039;s an example:

Ms P M Halshaw

should read

Ms PM Halshaw

so far im using [[:upper:]] [[:upper:]] in the find what box,
but i don&#039;t know the code to remove the single space between the capitals.

Any ideas?

Thanks</description>
		<content:encoded><![CDATA[<p>Hi all, I&#8217;m trying to dlete a single space between two capital letters, and i can&#8217;t! Its drving me nuts, any help would be much appreciated, here&#8217;s an example:</p>
<p>Ms P M Halshaw</p>
<p>should read</p>
<p>Ms PM Halshaw</p>
<p>so far im using [[:upper:]] [[:upper:]] in the find what box,<br />
but i don&#8217;t know the code to remove the single space between the capitals.</p>
<p>Any ideas?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Murphy</title>
		<link>http://indesignsecrets.com/grep-pattern-searching.php/comment-page-1#comment-473503</link>
		<dc:creator>Michael Murphy</dc:creator>
		<pubDate>Wed, 04 Mar 2009 03:37:09 +0000</pubDate>
		<guid isPermaLink="false">http://indesignsecrets.com/grep-pattern-searching.php#comment-473503</guid>
		<description>Glad to hear that worked, Lemonshrew. Sorry about the backslash thing. When I posted the comment initially, they were there, but somehow the blog filtered them out when I refreshed the page. For those following this thread, the pattern for the Find what field in my last comment should have shown a backslash before the letter &quot;r&quot; (which forms the metacharacter for a hard return), and a backslash before the number 1 (which forms the backreference to the first subpattern defined in the search &lt;code&gt;(d+)&lt;/code&gt;.

David &amp; Anne-Marie...do you think you can edit the comment on your end so that the backslashes appear as they should? That&#039;ll help people make sense of all this when we&#039;ve all long forgotten we ever posted it. :) Thanks!</description>
		<content:encoded><![CDATA[<p>Glad to hear that worked, Lemonshrew. Sorry about the backslash thing. When I posted the comment initially, they were there, but somehow the blog filtered them out when I refreshed the page. For those following this thread, the pattern for the Find what field in my last comment should have shown a backslash before the letter &#8220;r&#8221; (which forms the metacharacter for a hard return), and a backslash before the number 1 (which forms the backreference to the first subpattern defined in the search <code>(d+)</code>.</p>
<p>David &amp; Anne-Marie&#8230;do you think you can edit the comment on your end so that the backslashes appear as they should? That&#8217;ll help people make sense of all this when we&#8217;ve all long forgotten we ever posted it. <img src='http://indesignsecrets.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lemonshrew</title>
		<link>http://indesignsecrets.com/grep-pattern-searching.php/comment-page-1#comment-473491</link>
		<dc:creator>Lemonshrew</dc:creator>
		<pubDate>Tue, 03 Mar 2009 17:07:55 +0000</pubDate>
		<guid isPermaLink="false">http://indesignsecrets.com/grep-pattern-searching.php#comment-473491</guid>
		<description>You guys are the best! 

It took me a minute to figure out that the backslashes had dropped out of the post, but it works great!</description>
		<content:encoded><![CDATA[<p>You guys are the best! </p>
<p>It took me a minute to figure out that the backslashes had dropped out of the post, but it works great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Murphy</title>
		<link>http://indesignsecrets.com/grep-pattern-searching.php/comment-page-1#comment-473486</link>
		<dc:creator>Michael Murphy</dc:creator>
		<pubDate>Tue, 03 Mar 2009 16:00:53 +0000</pubDate>
		<guid isPermaLink="false">http://indesignsecrets.com/grep-pattern-searching.php#comment-473486</guid>
		<description>Lemonshrew -- There&#039;s a way to find any numbered reference (as you describe it in your example text) that&#039;s followed by another line that starts with the same number, then &quot;unite&quot; those two lines and remove the duplicate number. It requires using a backreference in the GREP search. I was working with Anne-Marie to solve a similar problem, and I detail how backreferences work in &lt;a href=&quot;http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold&quot; rel=&quot;nofollow&quot;&gt;a post on my blog&lt;/a&gt;, but here&#039;s a &lt;i&gt;specific&lt;/i&gt; solution to your problem.

This will find any &lt;i&gt;two&lt;/i&gt; lines that start with the same number and unite them onto one, removing the extraneous number, but it will only unite (a) and (b), not (a), (b), (c), (d), and so on. However, it will unite &lt;i&gt;every&lt;/i&gt; (a) and (b) line in it&#039;s first pass. You can run it again to unite the newly-united (a)(b) line with the (c) line, and so on. In other words, you&#039;ll have to run the search as many times as you have references for a number. If you have references a through e, that means you may have to run the search five times. But that five-time process will handle as many &lt;i&gt;numbered&lt;/i&gt; lines as you have, so even 176 numbered paragraphs will only require five searches.

In fact, the pattern actually gets more efficient the more times you run it. Lines keep getting paired up on each pass, so you may not even have to run it five times. Just keep running it until no more matches are found.

Here&#039;s what you&#039;d enter in the Find what field in the GREP area of the Find/Change dialog:

&lt;code&gt;(d+) (([a-z]))(.+)r1 (([a-z]))(.+)&lt;/code&gt;

and here&#039;s what you&#039;d enter in the Change to field:

&lt;code&gt;$1 $2$3 $4$5&lt;/code&gt;

Give it a try (on a copy of your file, of course!) and let me know how it works. I tried it on a sample directly copied from what you posted here, and added references up to (f) and it worked like a charm.

-- Michael</description>
		<content:encoded><![CDATA[<p>Lemonshrew &#8212; There&#8217;s a way to find any numbered reference (as you describe it in your example text) that&#8217;s followed by another line that starts with the same number, then &#8220;unite&#8221; those two lines and remove the duplicate number. It requires using a backreference in the GREP search. I was working with Anne-Marie to solve a similar problem, and I detail how backreferences work in <a href="http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold" rel="nofollow">a post on my blog</a>, but here&#8217;s a <i>specific</i> solution to your problem.</p>
<p>This will find any <i>two</i> lines that start with the same number and unite them onto one, removing the extraneous number, but it will only unite (a) and (b), not (a), (b), (c), (d), and so on. However, it will unite <i>every</i> (a) and (b) line in it&#8217;s first pass. You can run it again to unite the newly-united (a)(b) line with the (c) line, and so on. In other words, you&#8217;ll have to run the search as many times as you have references for a number. If you have references a through e, that means you may have to run the search five times. But that five-time process will handle as many <i>numbered</i> lines as you have, so even 176 numbered paragraphs will only require five searches.</p>
<p>In fact, the pattern actually gets more efficient the more times you run it. Lines keep getting paired up on each pass, so you may not even have to run it five times. Just keep running it until no more matches are found.</p>
<p>Here&#8217;s what you&#8217;d enter in the Find what field in the GREP area of the Find/Change dialog:</p>
<p><code>(d+) (([a-z]))(.+)r1 (([a-z]))(.+)</code></p>
<p>and here&#8217;s what you&#8217;d enter in the Change to field:</p>
<p><code>$1 $2$3 $4$5</code></p>
<p>Give it a try (on a copy of your file, of course!) and let me know how it works. I tried it on a sample directly copied from what you posted here, and added references up to (f) and it worked like a charm.</p>
<p>&#8211; Michael</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching using disk

Served from: indesignsecrets.com @ 2012-02-09 13:33:11 -->
