<?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: An Undocumented Bit of GREP Gold</title>
	<atom:link href="http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold/feed" rel="self" type="application/rss+xml" />
	<link>http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold</link>
	<description>information. instruction. insight.</description>
	<lastBuildDate>Tue, 27 Jul 2010 15:39:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Guido</title>
		<link>http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold/comment-page-1#comment-1780</link>
		<dc:creator>Guido</dc:creator>
		<pubDate>Tue, 13 Jul 2010 01:35:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold#comment-1780</guid>
		<description>I LOVE GREP…
Now, I&#039;m working on a volleyball yearbook and I am facing a very challenging formatting problem.
I have this:
player 1a-player 1b [xx] vs player 2a-player 2b [xx] 2-0
player 1a-player 1b [xx] vs player 2a-player 2b [xx] 1-2
and so on. The xx in square brackets is the ranking, from 1 to 32. What I need is to apply a bold character style to the WINNING team; so, it&#039;s some sort of conditional GREP, but I&#039;m not sure at all if this could be accomplished. Any idea? It&#039;s worth hours of my life…</description>
		<content:encoded><![CDATA[<p>I LOVE GREP…<br />
Now, I&#8217;m working on a volleyball yearbook and I am facing a very challenging formatting problem.<br />
I have this:<br />
player 1a-player 1b [xx] vs player 2a-player 2b [xx] 2-0<br />
player 1a-player 1b [xx] vs player 2a-player 2b [xx] 1-2<br />
and so on. The xx in square brackets is the ranking, from 1 to 32. What I need is to apply a bold character style to the WINNING team; so, it&#8217;s some sort of conditional GREP, but I&#8217;m not sure at all if this could be accomplished. Any idea? It&#8217;s worth hours of my life…</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Neets_Norway</title>
		<link>http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold/comment-page-1#comment-1677</link>
		<dc:creator>Neets_Norway</dc:creator>
		<pubDate>Tue, 20 Oct 2009 06:25:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold#comment-1677</guid>
		<description>Sorry Martin. It still cannot find match...

On the other hand, THIS code seems to find the symbols; (?&lt;=&quot;).*?(?=&quot;)
BUT it cant change it to the ones I want.

Help me please!

Anita</description>
		<content:encoded><![CDATA[<p>Sorry Martin. It still cannot find match&#8230;</p>
<p>On the other hand, THIS code seems to find the symbols; (?&lt;=&#8221;).*?(?=&#8221;)<br />
BUT it cant change it to the ones I want.</p>
<p>Help me please!</p>
<p>Anita</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Martin</title>
		<link>http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold/comment-page-1#comment-1644</link>
		<dc:creator>Martin</dc:creator>
		<pubDate>Sat, 26 Sep 2009 12:24:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold#comment-1644</guid>
		<description>Anita -
in case your problem w/ the replacement of quotation marks into norwegian quotation marks has not already been solved, here is my idea: Michael used the Unicode &#039;201C&#039; and &#039;201D&#039; in his find eypression. What if you replace both expressions into &#039;0022&#039;? It worked fine for me...

Martin</description>
		<content:encoded><![CDATA[<p>Anita -<br />
in case your problem w/ the replacement of quotation marks into norwegian quotation marks has not already been solved, here is my idea: Michael used the Unicode &#8216;201C&#8217; and &#8216;201D&#8217; in his find eypression. What if you replace both expressions into &#8216;0022&#8242;? It worked fine for me&#8230;</p>
<p>Martin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anita</title>
		<link>http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold/comment-page-1#comment-1619</link>
		<dc:creator>Anita</dc:creator>
		<pubDate>Fri, 04 Sep 2009 12:36:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold#comment-1619</guid>
		<description>Sorry Michael! 
&quot;Cannot find match.&quot; it says!

Per ”Elvis” Granberg (1941-1980) startet sin artistkarriere i musikalen ”South Pacific” i 1954. Hans rockekarriere skjøt for alvor fart i 1958 og han var aktiv fram til 60-tallet. 

This is a typical text that we have to change all the quotation marks on... 
And it can&#039;t seem to find it... The text is copied from Word.

And I would like it to look like this; 
Per «Elvis» Granberg (1941-1980) startet sin artistkarriere i musikalen «South Pacific» i 1954. Hans rockekarriere skjøt for alvor fart i 1958 og han var aktiv fram til 60-tallet. 

As you can see, its a s***te job when the customers hit a quotation mark high! I have to change the dictionary to Norwegian: Bokmål, then the double quotes into «»...Then start the prosess using Find/Grep to change them all in to the left side «, and once more to change every other (right side ») using Find next -&gt; Change -&gt; Find next... Not funny at all...!

Thank you SO much for helping me out! 
As you can see, it&#039;s bloody frustrating to work like this...  :o)

Anita</description>
		<content:encoded><![CDATA[<p>Sorry Michael!<br />
&#8220;Cannot find match.&#8221; it says!</p>
<p>Per ”Elvis” Granberg (1941-1980) startet sin artistkarriere i musikalen ”South Pacific” i 1954. Hans rockekarriere skjøt for alvor fart i 1958 og han var aktiv fram til 60-tallet. </p>
<p>This is a typical text that we have to change all the quotation marks on&#8230;<br />
And it can&#8217;t seem to find it&#8230; The text is copied from Word.</p>
<p>And I would like it to look like this;<br />
Per «Elvis» Granberg (1941-1980) startet sin artistkarriere i musikalen «South Pacific» i 1954. Hans rockekarriere skjøt for alvor fart i 1958 og han var aktiv fram til 60-tallet. </p>
<p>As you can see, its a s***te job when the customers hit a quotation mark high! I have to change the dictionary to Norwegian: Bokmål, then the double quotes into «»&#8230;Then start the prosess using Find/Grep to change them all in to the left side «, and once more to change every other (right side ») using Find next -&gt; Change -&gt; Find next&#8230; Not funny at all&#8230;!</p>
<p>Thank you SO much for helping me out!<br />
As you can see, it&#8217;s bloody frustrating to work like this&#8230;  <img src='http://www.theindesigner.com/blog/wp-includes/images/smilies/icon_surprised.gif' alt=':o' class='wp-smiley' /> )</p>
<p>Anita</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Murphy</title>
		<link>http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold/comment-page-1#comment-1616</link>
		<dc:creator>Michael Murphy</dc:creator>
		<pubDate>Tue, 01 Sep 2009 13:26:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold#comment-1616</guid>
		<description>Hello again, Anita --

If you want to find any text within US quotation marks and change it to your Norwegian marks, you need to specify the quotation mark characters without using the options available under the Quotation marks sub-menu of the special characters flyout menu. The options there don&#039;t distinguish between the two.

The most bullet-proof way of doing this is to refer to each specific quote type by its unicode value. In the Find What field, you would enter the following:

&lt;b&gt;&lt;code&gt;\x{201C}(.+?)\x{201D}&lt;/code&gt;&lt;/B&gt;

That translates as &quot;an opening left double quotation mark, followed by any character, one or more times (shortest match), followed by a closing right double quotation mark. The part of the expression that describes the text within those quotes is enclosed in a marking subexpression (within parentheses), so it can be put back later.

In the Change To field, you would enter the following:

&lt;b&gt;&lt;code&gt;\x{00AB}$1\x{00BB}&lt;/code&gt;&lt;/b&gt;
That puts back the text that was within the quotation marks, but surrounds them instead with the proper double-angle quotation marks, left and right.

I tested this on my end and it works fine. Let me know if it solves your specific challenge.

Michael</description>
		<content:encoded><![CDATA[<p>Hello again, Anita &#8211;</p>
<p>If you want to find any text within US quotation marks and change it to your Norwegian marks, you need to specify the quotation mark characters without using the options available under the Quotation marks sub-menu of the special characters flyout menu. The options there don&#8217;t distinguish between the two.</p>
<p>The most bullet-proof way of doing this is to refer to each specific quote type by its unicode value. In the Find What field, you would enter the following:</p>
<p><b><code>\x{201C}(.+?)\x{201D}</code></b></p>
<p>That translates as &#8220;an opening left double quotation mark, followed by any character, one or more times (shortest match), followed by a closing right double quotation mark. The part of the expression that describes the text within those quotes is enclosed in a marking subexpression (within parentheses), so it can be put back later.</p>
<p>In the Change To field, you would enter the following:</p>
<p><b><code>\x{00AB}$1\x{00BB}</code></b><br />
That puts back the text that was within the quotation marks, but surrounds them instead with the proper double-angle quotation marks, left and right.</p>
<p>I tested this on my end and it works fine. Let me know if it solves your specific challenge.</p>
<p>Michael</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anita</title>
		<link>http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold/comment-page-1#comment-1615</link>
		<dc:creator>Anita</dc:creator>
		<pubDate>Tue, 01 Sep 2009 10:56:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold#comment-1615</guid>
		<description>Another question...

Norway does not have the same quotationmarks as US. I&#039;m struggling to find out  how to do this...
I need to find:
&quot; Any text with in quatationmark&quot;
and turn it into 
«found text but with norwegian marks»

This is probably dead easy... But I cant seem to figure it out.
Please help me once again!

Neets</description>
		<content:encoded><![CDATA[<p>Another question&#8230;</p>
<p>Norway does not have the same quotationmarks as US. I&#8217;m struggling to find out  how to do this&#8230;<br />
I need to find:<br />
&#8221; Any text with in quatationmark&#8221;<br />
and turn it into<br />
«found text but with norwegian marks»</p>
<p>This is probably dead easy&#8230; But I cant seem to figure it out.<br />
Please help me once again!</p>
<p>Neets</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anita</title>
		<link>http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold/comment-page-1#comment-1574</link>
		<dc:creator>Anita</dc:creator>
		<pubDate>Tue, 30 Jun 2009 06:14:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold#comment-1574</guid>
		<description>Heeey! Thanks and thanks again!!!! You just saved my customer an hour of spacing!!!</description>
		<content:encoded><![CDATA[<p>Heeey! Thanks and thanks again!!!! You just saved my customer an hour of spacing!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Murphy</title>
		<link>http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold/comment-page-1#comment-1573</link>
		<dc:creator>Michael Murphy</dc:creator>
		<pubDate>Wed, 24 Jun 2009 12:09:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold#comment-1573</guid>
		<description>Anita --

This is a very easy one. You&#039;ve got a pattern of 8 digita per line and you want to divide that into four sets of two digits each.

In the Find What field, the pattern is described as:
&lt;CODE&gt;&lt;STRONG&gt;(\d\d)(\d\d)(\d\d)(\d\d)&lt;/STRONG&gt;&lt;/CODE&gt;

The parentheses around each of the two &quot;any digit&quot; metacharacters marks them as a sub-pattern to be remembered so you can refer back to it in the change part of the query.

Alternately, you can describe the pattern as:
&lt;CODE&gt;&lt;STRONG&gt;(\d{2})(\d{2})(\d{2})(\d{2})&lt;/STRONG&gt;&lt;/CODE&gt;
They&#039;re just two different ways of doing the same thing.

In the Change to field, you recall those four sub-patterns with Found Text metacharacters, referring to each of the four sub-patterns numerically, in the order in which they appear (1st, 2nd, 3rd and 4th, in this instance). In between each, you add a space (or two spaces, or however much you need).

That Change To pattern is described as:
&lt;CODE&gt;&lt;STRONG&gt;$1 $2 $3 $4&lt;/STRONG&gt;&lt;/CODE&gt;

That puts back each pair of unique numbers found with space between each pair.</description>
		<content:encoded><![CDATA[<p>Anita &#8211;</p>
<p>This is a very easy one. You&#8217;ve got a pattern of 8 digita per line and you want to divide that into four sets of two digits each.</p>
<p>In the Find What field, the pattern is described as:<br />
<code><strong>(\d\d)(\d\d)(\d\d)(\d\d)</strong></code></p>
<p>The parentheses around each of the two &#8220;any digit&#8221; metacharacters marks them as a sub-pattern to be remembered so you can refer back to it in the change part of the query.</p>
<p>Alternately, you can describe the pattern as:<br />
<code><strong>(\d{2})(\d{2})(\d{2})(\d{2})</strong></code><br />
They&#8217;re just two different ways of doing the same thing.</p>
<p>In the Change to field, you recall those four sub-patterns with Found Text metacharacters, referring to each of the four sub-patterns numerically, in the order in which they appear (1st, 2nd, 3rd and 4th, in this instance). In between each, you add a space (or two spaces, or however much you need).</p>
<p>That Change To pattern is described as:<br />
<code><strong>$1 $2 $3 $4</strong></code></p>
<p>That puts back each pair of unique numbers found with space between each pair.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anita</title>
		<link>http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold/comment-page-1#comment-1572</link>
		<dc:creator>Anita</dc:creator>
		<pubDate>Wed, 24 Jun 2009 08:51:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold#comment-1572</guid>
		<description>Hello again!

There are no spaces inbetween the numbers.
They&#039;re like this:

57750444
57750455
57750555

And my problem is that I have to divide them to this:

57 75 04 44
57 75 04 55
57 75 05 55

Is this possible?
I&#039;m lazy, therefore I love GREP!</description>
		<content:encoded><![CDATA[<p>Hello again!</p>
<p>There are no spaces inbetween the numbers.<br />
They&#8217;re like this:</p>
<p>57750444<br />
57750455<br />
57750555</p>
<p>And my problem is that I have to divide them to this:</p>
<p>57 75 04 44<br />
57 75 04 55<br />
57 75 05 55</p>
<p>Is this possible?<br />
I&#8217;m lazy, therefore I love GREP!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Murphy</title>
		<link>http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold/comment-page-1#comment-1566</link>
		<dc:creator>Michael Murphy</dc:creator>
		<pubDate>Mon, 22 Jun 2009 19:13:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.theindesigner.com/blog/an-undocument-bit-of-grep-gold#comment-1566</guid>
		<description>Lain --

You don&#039;t need a script to do this. There&#039;s a good way to do it in CS3 (with GREP Find/Change) and a better way to do it in CS4 (with a GREP Style).

&lt;strong&gt;The First Step: Create a Ligature-Killing Character Style&lt;/strong&gt;
Whichever version you&#039;re using, the beginning of the process is the same. Make a character style that has everything else about it shut off or undefined (in other words, every field for Font, Style, Size, etc. should be blank, all checkboxes left in the &quot;neutral&quot; state, and all pull-down menus set to Ignore (or completely blank). The &lt;em&gt;only&lt;/em&gt; thing that should be assigned to this character style is that Ligatures should be specifically shut off (as shown below).

&lt;IMG SRC=&quot;http://www.theindesigner.com/images/ligatures_off.png&quot; WIDTH=445 HEIGHT=308&gt;&lt;/IMG&gt;

&lt;strong&gt;The CS3 Method:&lt;/strong&gt;
In CS3, you can turn off the ligatures using this style with Find/Change, and it can be a Text-based Find/Change. There&#039;s no GREP required for this in CS3. Simply do a case-sensitive search for the letters &quot;fi&quot; together. Leave the Change to field blank and from the Change Format settings, choose the character style created above to be applied to all instances of &quot;fi&quot; in your document (or story, or selection, or whatever range suits your needs). Find the first instance, then click Change All. That will apply the character style that disables ligatures to all instances of a lower-case &quot;fi&quot; pair in your text.

You&#039;ll need to run this Find/Change operation whenever the document&#039;s text is changed, just to be sure that new &quot;fi&quot; pairs haven&#039;t been added to the text that don&#039;t have this character style applied. The same would be true if you created a script to do this, as scripts need to be run each time you want to take advantage of their functionality.

&lt;strong&gt;The CS4 Method:&lt;/strong&gt;
Find/Change is not necessary in CS4. Instead, create a new GREP Style within the paragraph style (or styles) where you want the &quot;fi&quot; ligature turned off. In the GREP Style options, select the character style created in the first step, and put &quot;fi&quot; (without the quotes) in the &quot;To Text&quot; field. The GREP Style eliminates the need to do multiple Find/Change operations, as it continuously scans the paragraph for &quot;fi&quot; combinations and automatically applies the character style to every one it finds.

Hope this helps,

Michael</description>
		<content:encoded><![CDATA[<p>Lain &#8211;</p>
<p>You don&#8217;t need a script to do this. There&#8217;s a good way to do it in CS3 (with GREP Find/Change) and a better way to do it in CS4 (with a GREP Style).</p>
<p><strong>The First Step: Create a Ligature-Killing Character Style</strong><br />
Whichever version you&#8217;re using, the beginning of the process is the same. Make a character style that has everything else about it shut off or undefined (in other words, every field for Font, Style, Size, etc. should be blank, all checkboxes left in the &#8220;neutral&#8221; state, and all pull-down menus set to Ignore (or completely blank). The <em>only</em> thing that should be assigned to this character style is that Ligatures should be specifically shut off (as shown below).</p>
<p><img SRC="http://www.theindesigner.com/images/ligatures_off.png" WIDTH=445 HEIGHT=308/></p>
<p><strong>The CS3 Method:</strong><br />
In CS3, you can turn off the ligatures using this style with Find/Change, and it can be a Text-based Find/Change. There&#8217;s no GREP required for this in CS3. Simply do a case-sensitive search for the letters &#8220;fi&#8221; together. Leave the Change to field blank and from the Change Format settings, choose the character style created above to be applied to all instances of &#8220;fi&#8221; in your document (or story, or selection, or whatever range suits your needs). Find the first instance, then click Change All. That will apply the character style that disables ligatures to all instances of a lower-case &#8220;fi&#8221; pair in your text.</p>
<p>You&#8217;ll need to run this Find/Change operation whenever the document&#8217;s text is changed, just to be sure that new &#8220;fi&#8221; pairs haven&#8217;t been added to the text that don&#8217;t have this character style applied. The same would be true if you created a script to do this, as scripts need to be run each time you want to take advantage of their functionality.</p>
<p><strong>The CS4 Method:</strong><br />
Find/Change is not necessary in CS4. Instead, create a new GREP Style within the paragraph style (or styles) where you want the &#8220;fi&#8221; ligature turned off. In the GREP Style options, select the character style created in the first step, and put &#8220;fi&#8221; (without the quotes) in the &#8220;To Text&#8221; field. The GREP Style eliminates the need to do multiple Find/Change operations, as it continuously scans the paragraph for &#8220;fi&#8221; combinations and automatically applies the character style to every one it finds.</p>
<p>Hope this helps,</p>
<p>Michael</p>
]]></content:encoded>
	</item>
</channel>
</rss>
