Replace on part of a wildcards search

Peter Gold peter at knowhowpro.com
Mon Oct 5 12:27:42 PDT 2009


David, I believe you're making a leap that's understandable, but, at
least, not correct at this time. Searching Cari's site returns only
the DTPtools.com MIF Filter (MF) plug-in for InDesign, a third-party
tool for converting MIF files to InDesign files.

InDesign has a pretty-good but incomplete GREP ability. It can find
and replace text, and it can replace From Clipboard ("By Pasting" in
FrameMaker lingo), so the replacement isn't limited only to text.

New in InDesign CS4, is a GREP power added to InDesign's "Nested
Style" feature. A Nested (paragraph) Style (aka "paragraph format tag
name" in FrameMaker lingo) can specify how named character styles (aka
"character format tag name" in FrameMaker lingo) are applied within a
paragraph. For example, you can give nested-style properties to a
paragraph style named TopicFirst that applies a character style named
TopicIntro that applies bold and perhaps a slightly larger font to
text, to the first x-number of words, then let the paragraph revert to
its default style. In FrameMaker, you'd use a run-in paragraph for
this; InDesign doesn't have a run-in paragraph property, yet.

The nested paragraph style can apply multiple character styles
according to rules that amount essentially to programmed instructions.
You can specify a GREP style that applies a character style to every
n-th word or n-th character, or removes quotes around phrases and
applies italics to the formerly quoted text. This would be useful for
revising submitted text from authors who quoted titles, instead of
italicizing them.

In fact, InDesign's nested paragraph style is incredibly rich; it can
specify that line "n" is formatted with a character style, and if text
reflows, the style remains on line "n," and doesn't flow to other
lines. You can specify that one or more style settings are applied for
a number of repetitions.

Over the past few years, I've been whining on the InDesign lists about
its lack of FrameMaker's, like cross-references, smart auto-numbered
lists, and text variables like running headers. Release-by-release
these and more features have been added. This response might be a good
reason to whine on the FrameMaker lists for some of InDesign's
features, like nested paragraph styles.

HTH

Regards,

Peter
_______________________
Peter Gold
KnowHow ProServices



On Mon, Oct 5, 2009 at 1:53 PM, David Spreadbury <dspreadb at yahoo.com> wrote:
> Searching for "framemaker grep" brought what might be a source for using GREP with Adobe products. Apparently it is not limited to FrameMaker. Try reading what is available at http://carijansen.com/. If this doesn't help, maybe contacting the author, Cari Jansen, in Perth, Australia, would provide the answers.
>
> HTH
>
> David Spreadbury
> Sr. Technical Writer
>
>
> -----Original Message-----
> From: framers-bounces at lists.frameusers.com [mailto:framers-bounces at lists.frameusers.com] On Behalf Of Peter Gold
> Sent: Monday, October 05, 2009 1:32 PM
> To: Les Smalley
> Cc: framers at lists.frameusers.com
> Subject: Re: Replace on part of a wildcards search
>
> FrameMaker has long a GREP-like search feature, in FM, and some
> documentation for it. However, the replace wasn't GREP-like. But worse
> yet, there doesn't seem to be a trace of the documentation for it in
> FM9. I've forgotten how to use it, and without the doc, I'm not sure
> that my couple of quick tests were failing because the feature's gone
> from the product as well as the doc, or if I just didn't enter the
> search string correctly.
>
> I don't have an earlier FrameMaker installed, and don't have the
> earlier docs handy. Perhaps someone on the list can respond.
>
>
> HTH
>
> Regards,
>
> Peter
> _______________________
> Peter Gold
> KnowHow ProServices
>
>
>
> On Mon, Oct 5, 2009 at 12:01 PM, Les Smalley <l_c_smalley at yahoo.com> wrote:
>> Hi Avi,
>>
>> The asterisk ( * ) wildcard matches any character EXCEPT
>> spaces or punctuation; the wildcard character to use for those is the
>> verticle bar ( | ) but also remember that the tab character is "\t" (no
>> quotes) ...
>>
>> Regardless, unfortunately you can't do it with
>> FrameMaker as you describe attempting.  The search tool removes
>> everything matched by the search string and inserts the replace string
>> in its place, so you will also lose the "Command" string.  It is a
>> great disappointment that a real GREP search capability (or even more
>> general awk text processing features) has never been implemented in FM.
>>
>> If
>> you search for just "Unit32" and replace that with "SHORT_ID" you can
>> do what you want by careful use of the 'Change & Find' or just
>> 'Find' buttons (and I understand how tedious and error-prone this can
>> be.)
>>
>> It may be posible to do this via scripting (e.g.
>> FrameScript, etc.; I'm sure others more knowledgeable will chime in) or
>> possibly by saving to MIF and using a text based editor on that, then
>> reopening it in FM to verify the results.
>>
>> FWIW, grep and awk
>> (and a number of other unix tools) are available as utilities for
>> Windows and any search engine can point you to places to get them.
>>
>> – Les
>>
>> --- On Mon, 10/5/09, Avraham Makeler <amakeler at gmail.com> wrote:
>> Hi all,
>> How do you do a Replace on part of a wildcards search?
>>
>> E.,g., I am looking for a line with:
>>
>> Uint32 Command
>>
>> where there can be any type and amount of white space between "Uint32" and
>> "Command".
>>
>> So I guess the wild card search format will be
>>
>> Uint32*Command
>>
>> No?
>>
>> But then if I want to replace just the "Uint32" part with "SHORT_ID". How
>> would i do that?
>>
>> TIA
>>
>> - avi
>> _______________________________________________
>
>
>
>



More information about the framers mailing list