• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Regex capture when searching for a character or paragraph tag?

Explorer ,
Apr 05, 2019 Apr 05, 2019

Copy link to clipboard

Copied

Is there a way in the Find/Change dialog to search for a character tag, capture the corresponding text and use that text in the Change field?

Views

468

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advisor , Apr 05, 2019 Apr 05, 2019

Ah, I think I misunderstood your original question.

If I've got it right this time, you want to add a prefix and suffix to all text strings tagged with a particular character tag? That explains why you referred to regular expressions in the title of this thread. FrameMaker can use regular expression conventions to add a prefix and suffix to a found string, but only if that string was found by searching for a regular expression. A variation of the complex instructions in my previous suggestion wou

...

Votes

Translate

Translate
Advisor ,
Apr 05, 2019 Apr 05, 2019

Copy link to clipboard

Copied

When you have selected text in your document and you switch from the document window to the Find/Change dialog box when the current search option requires text, FrameMaker copies the selected text into the search field.

In your case, you can therefore:

1. Select Character Tag from the pull-down menu at the top of the Find/Change dialog box, type the name of the character tag you want in the text box underneath that option, and click Find or press Enter.

2. The focus is still in the dialog box and you want to switch back to the document without removing the selection. You can do so either with Shift F7 or by clicking an empty spot on the title bar at the top of the document window.

3. Go back to the dialog box with Ctrl-f or Edit > Find/Change. FrameMaker copies the selected text (the result of the first search) into the search field in the dialog box but the search type is still set to Character Tag.

4. Change it to Text and click Find or press Enter.

     --Lynne

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 05, 2019 Apr 05, 2019

Copy link to clipboard

Copied

Hi Lynne, Maybe I am misunderstanding your response, but I am not trying to look for specific text.

I am looking for arbitrary text of in a given character format so that I can then wrap that text in additional characters.

I need to capture that arbitrary text so I can use it in the change box.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Apr 05, 2019 Apr 05, 2019

Copy link to clipboard

Copied

Ah, I think I misunderstood your original question.

If I've got it right this time, you want to add a prefix and suffix to all text strings tagged with a particular character tag? That explains why you referred to regular expressions in the title of this thread. FrameMaker can use regular expression conventions to add a prefix and suffix to a found string, but only if that string was found by searching for a regular expression. A variation of the complex instructions in my previous suggestion would let you search for the character tag, then search for a regular expression consisting of the string you've already found, and then use regular expression conventions to add the prefix or suffix. Not something that would be very practical to repeat numerous times.

This may be a good candidate for scripting.

    --Lynne

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Apr 07, 2019 Apr 07, 2019

Copy link to clipboard

Copied

LATEST

Hi Pdeitel:

I can do this in InDesign, because InDesign separates formatting from the Regex queries. I can't see any way to accomplish this in FrameMaker. I wish we could get more of InDesign's Find/Change capabilities into FrameMaker.

~Barb

Screen Shot 2019-04-07 at 1.39.30 PM.pngScreen Shot 2019-04-07 at 1.39.45 PM.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines