Skip to main content
ashrae-editor
Known Participant
October 4, 2022
Question

Searching for a String with a Single Character Format

  • October 4, 2022
  • 4 replies
  • 432 views

Hello!

 

I'm pretty familiar with Adobe's search options, including searching for a specific character format, searching for a specific string, or searching for a string + copied character formats, but is there any way to search for a specific string while specifying a single character format?

 

For example, I'm trying to capture all instances of the word "analyze" that appear in Roman type so that I can conver them to italics.

 

I can search for "analyz*" using a wildcard search or "\banalyz*\b" using a regexp search, but I can't specify the character style (Roman type) this way. If I copy "analyz" and search for text and character formats on clipboard, it won't capture variations in, for example, font size.

 

Is there a way to do what I want to do that I'm just not seeing? I was hoping at first that there might be a regexp flag for this, but I can't find anything online...

 

Thanks!

Matt

    This topic has been closed for replies.

    4 replies

    frameexpert
    Community Expert
    Community Expert
    October 5, 2022

    I have a script that could be modified to do what you want. See Textformatter at http://frameexpert.com/store/index.html.

    K.Daube
    Community Expert
    Community Expert
    October 5, 2022

    «I'm trying to capture all instances of the word "analyze" that appear in Roman type so that I can conver them to italics.»

    This morning during shaving I imagined an extension to my evolving FMfindRepl script. I always try to first find an UI for the case - how to tell the script what I want:

    The idea is to add a second line in the Find what field starting with &&& and a space after it. Then the text to be found (which in this example is a RegEx).

    The primary Find object is a Character Tag (a catalogued style) which is selected from the drop-down list (x-title). If you are looking for an arbitrary character format, just create a catalogue entry from it (e.g. zzz) which you can remove from the catalogue after the work.

    After finding the text in a defined character format you want to change the character format - not the text. You would select this also from a drop down list (which contains the same items at the one on top).

    → I will try to develop this starting towards the end of next week ...

    Edit 2022-10-10

    For more than reason I will not try to develop this...

    • To search for something in plain text or search for a character tag are two very different thins - and hence my idea does not fulfill the requirement of the user.
    • I’m not a fan of to specific solutions in this general script.

    The task could be achieved like this:

    • Find the first text occurrence and check visually whether it is already italic - if not, apply the format with the appropriate dialogue.
    • Find the next text occurrence (F3). If required apply the format italic by simply hitting F6 (repeat last action).
    • Applying italics could be achieved by repeating (F6) application of the character format. The simple searching for the string and visually checking whether it is already italic or not would solve the requirement.
    Matt-Tech Comm Tools
    Community Expert
    Community Expert
    October 4, 2022

    You should be able to export your file to MIF, use (any text editor...I use NotePad++) to search for the MIF string that has your character format. Change as needed, then open the file again in Fm.

    -Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant
    LinSims
    Community Expert
    Community Expert
    October 4, 2022

    There isn't in FrameMaker itself (one of the few times Word is better). Klaus may have added it to his super-duper find/change utility he's been working on. Reminds me, I should see if that's been updated ...

    ashrae-editor
    Known Participant
    October 4, 2022

    Super-duper find/change utility you say? 🙂