Find/Change wildcard help

I'm working on a directory and need to apply a character style to certain areas in CS3. Is there a way to use a wild card to find "any word?" For example, I need to find the following and apply the style; name, tab, number, tab, any character, tab.
Having ID find the name portion, which can vary in character length, is what I can't quite figure out, I've got the rest figured out.

Here's is a sample of how it is structured:
[Start of paragraph]Joseph[tab]4[tab]GV[tab]Address
I need to be able to change everything BEFORE the "Address" field to a Character Style. Obviously, all 3 fields are variable from line to line, but every line that needs to change is precisely structured as the sample except the character count in each field can change (the number field may contain 1 or 2 numbers and the code field may contain one or two characters). I've played with the GREP function a bit, but still can't figure it out.
Thanks,
Jeremy

Similar Messages

  • [CS2][JS]Find/Change/Expand Help....

    Please i really can't get this done or have no idea how to. There are people who helped me do this function but i don't know how to apply it in my actual file.
    app.findPreferences = app.changePreferences = null;
    app.findPreferences.appliedCharacterStyle = 'cbib';
    var myFound = app.activeDocument.search( '' );
    for (j=0; j > myFound.length; j++)
    var LamanNgCbib = myFound[j].contents.slice(1,-1);
    var dar = LamanNgCbib.replace(/\uFEFF/g, '');
    var expanded = unrange(dar);
    app.activeDocument.search( dar, false, false, expanded )
    function unrange (s)
    return s.replace (/(\d+)\u2013(\d+)/g, expand)
    function expand ()
    var expanded = [];
    var start = Number (arguments[1]);
    var stop = Number (arguments[2]);
    for (var i = start; i <= stop; i++)
    expanded.push (i);
    return expanded
    The script only replaces the first instance ([1,3,5-7] becomes [1,3,5,6,7,8]) but the rest does not. so i have to run the script again for the others to unrange and wait forever 'til the script finished. Is there anyway to loop my search and replace so i have to run the script only once? Please i really need your help scripters.

    Your loop is wrong.
    You should be using:
    for (j = myFound.length - 1; j >= 0; j--)
    Because you're changing the text, it is vital that you iterate backwards.
    Your loop doesn't even iterate because you have the comparison the wrong way around.
    Dave

  • Find/Change help with wildcard numbers...

    hello... i'm looking for help with wildcards...
    i have a specific task to complete.. i need to add dash & space into a space in a string of letters and characters...
    here
    221kbps - 00:28:34space dash space here47Mb - 44.1 kHz
    198kbps - 01:27:43 41Mb - 44.1 kHz
    215kbps - 00:34:52 156Mb - 44.1 kHz
    225kbps - 00:32:14 54Mb - 48 kHz
    so my finished text will look like this
    221kbps - 00:28:34 - 47Mb - 44.1 kHz
    198kbps - 01:27:43 - 41Mb - 44.1 kHz
    215kbps - 00:34:52 - 156Mb - 44.1 kHz
    225kbps - 00:32:14 - 54Mb - 48 kHz
    there are many variables to the text - but i thought perhaps i could create a wildcard digit find/change based on the Mb bit, replacing the single space with space dash space
    BUT
    i need to retain the numbers before the Mb
    so my question - is it possible to RETAIN WILDCARD NUMBERS?
    merci beaucoup!

    omg... just fell of my chair
    tried it in text - no joy...
    tried it as a grep.
    YES YES YES
    thankyou so much - i have about 18,000 to format for a music website...
    www.littledogdiscs.co.uk
    if you ever find your way to our neck of the woods in the South of France - please do visit my b&b
    www.maisonverdigris.com
    i have a bottle of vintage champagne with your name on it...
    thanks
    teresa

  • Help with Find/Change and wildcards

    I have indesign CS5 and I'm working on a document that has math examples throughout such as 9-1=8. The proofreader said we need to change it to have a space between each digit and math symbol to be 9 - 1 = 8. How can I do this? When I go to Find/Change I have the option of wildcards in the Find, but not in the Replace.
    Also the dash in these equations need to be changed to en dashes. How can I tell indesign that anytime is sees such an equation the dash needs to be changed? I don't want to just change all dashes as I have many dashes that need to stay.

    I do it in two steps, first changing the hyphens to en-dashes:
    Find (?<=\d)-(?=\d) which finds any hypen between two digits
    Replace ~= which is the en-dash
    Then use a class to hold the math symbols:
    Find (\d|\))([\+\*/~==])(\d|\()   (this adds open and close parentheses to the search before or after a symbol -- if your equations don't use parentheses you can eliminate the |\( and |\) from the first and last search groups)
    Replace $1 $2 $3  (there's a space between the terms there).
    This does not include radicals, or advanced math symbols in the search, so if your equations use those, you need to add them, and it doesn't put spaces between digits and parentheses.

  • I cannot find information to help me change the orientation of a video filmed in portrait format but only able to be played back lying on its side  (landscape) instead of upright. All the rotation buttons for iPhoto are not 'engaged' when it is in video .

    I cannot find information to help me change the orientation of a video filmed in portrait format but it can only able to be played back lying on its side  (landscape) instead of upright. All the rotation buttons for iPhoto are not 'engaged' when it is in video .

    Thanks OT,
    I tried the Export function but it would not allow me to choose the option of exporting to iMovie. I think you are right about needing Quicktime Pro. I opened iMovie and imported the clip from iPhoto and with some searching found the 'cropping, rotation' mechanism. So I now have a copy in the correct orientation. I plan to import/export it back to iPhoto because I want to have a copy on my iPhone to show people and I wanted to have it available as part of a slideshow I am making in iPhoto of my recent overseas trip. It is a pain that there is no simple orientating tool for the movie clips downloaded to iPhoto with the photos from the one camera.

  • Find/Change GREP - FindChangeByList - help!

    Hi,
    Can anyone help with my GREP problem? I have a long unformatted list of products, I need a couple of GREP find and change queries to help format the list. The formatting will be based on paragraph styles for product header, description and product code. I have GREP working correctly to find the product code lines and apply the 'product code' paragraph style, but I'm struggling to target the product header line. The product header is on the next line after the product code, or it could be found on the line above the product description. I need GREP to find the product header to apply the product header paragraph style. I'm looking at using FindChangeByList; so far I have the folowing:
    grep
    {findWhat:"(Product Code|Product code)$"}
    {appliedParagraphStyle:"Product Code-green"}
    The above line finds all the Product Codes and applies the paragraph style. It works perfectly well from Indesigns Find/Change panel and FindChangeByList.
    But the next bit doesn't work:
    grep
    {findWhat:"^(?<=\\r)", appliedParagraphStyle:"Product Code-green"}
    {changeTo:"", appliedParagraphStyle:"Product Header-green"}
    I've tried to target the 'Start of a paragraph (^)' (this will be the product header) that has - 'Paragraph Break (\r)' with the 'Product Code-green' applied (this is the product code), in front of it. - (Am I right in thinking that in the FindChangeByList script I need 2 slashed on \\r - I have tried with 1 and 2 - no joy.)
    If I do this in Indesigns Find/Change panel it does kind of work. If I click find, it will find the correct point, and click change, it will apply the correct style to the product header - BUT if I click CHANGE ALL - it doesn't work. It reports '0' instances found, yet if i click Find again it will find the next instance. So it's kind of working on an individual click and find basis, but not on global change all - STRANGE? And it doesn't work at all when run from FindChangeByList.
    Anybody got any thoughts on why this is happening? or a better piece of GREP to try? Would really like it to be running from FindChangeByList. Hope the above makes sense.
    Thanks

    Hi,
    You can go straight or try to modify 'MultiFind' script.
    I suggest to use a text conditions and go straight with this code:
    var
              mDoc = app.activeDocument,
              mCond = mDoc.conditions.item("mFound"),
              mPath = "~/Documents/ID_words_to_find.txt",
              mDelimiter = ",",
              mSource = File(mPath),
              mOpen = mSource.open("r",undefined,undefined),
              len, len1, mWordsArr, mFound;
    if (!mCond.isValid)
              mCond = mDoc.conditions.add({
                        name: "mFound",
                        indicatorColor: UIColors.LIGHT_BLUE,
                        indicatorMethod: ConditionIndicatorMethod.USE_HIGHLIGHT,
                        underlineIndicatorAppearance: ConditionUnderlineIndicatorAppearance.SOLID
    if ( !mOpen) {alert ("Can't open a source file"; exit()};
    mWordsArr = mSource.read().split(mDelimiter);
    len = mWordsArr.length;
    app.findTextPreferences = null;
    while (len-->0) {
              app.findTextPreferences.findWhat = mWordsArr[len];
              mFound = mDoc.findText();
              len1 = mFound.length;
              while (len1-->0)
                        mFound[len1].appliedConditions = [mCond];
    app.findTextPreferences = null;
    How it works (should)?
    Assumed:
    - a list of words to find is in a .txt file as comma-delimited (you could set other delimiter)
    - this file is named 'ID_words_to_find'  and saved in user Documents folder (you can change mPath)
    Script define a condition 'mFound' and apply it to every word from your list found in a document. They are highlighted. You can modify them.
    Notice: to remove a condition (highlight) modify a word including a space before it.
    Enjoy:)
    Jarek

  • Help for find/change glyphs script

    Hi everyone!
    I need help for creating a script (or modifying existing script) that should replace every Cyrillic character  from an old ASCII font with the same Cyrillic character but from new Unicode font.
    For example: Capital letter 'A' GID=107 from old font (Lazurski) should be replaced with 'A' GID=630 from new one (Myriad Pro).
    I can do this by using Indesign Find/Change - Glyphs, but this will take me too much time.
    So, I need a scrip for this job.
    My first attempt was to use the FindChangeByList script by modifying the FindChangelist.txt document, but without success.
    Here is what I've used until now:
    1)  glyph {glyphID:107, appliedFont:"Lazurski"} {glyphID:630, appliedFont:"Myriad Pro"} {caseSensitive:false, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false}
    2)  glyph {findWhat:"u00C0", appliedFont:"Lazurski", fontStyle:"Bold"} {changeTo:"0410", appliedFont:"Myriad Pro", fontStyle:"Bold"} {caseSensitive:false, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find ASCII A replace with Unicode A.
    Both lines didn't change anything. What is wrong?
    Any help is welcome!
    Regards,
    Veselin
    P.S. Indesign CS5

    Thank you Jongware!
    The codes (both ID and Unicode) are correct for sure, but even with correct notation (obviously my was wrong) the script don't change anything.
    Here is the line in the FindChangeList:
    text {findWhat:"\u00C0", appliedFont:"Lazurski", fontStyle:"Bold"} {changeTo:"\u0410", appliedFont:"Myriad Pro", fontStyle:"Bold"} {caseSensitive:false, includeMasterPages:true, includeHiddenLayers:true, wholeWord:false} Find ASCII A replace with Unicode A.
    Update:
    Finally, I found what is wrong with the script - the properties "caseSensitive:false".
    By removing that properties the script works fine.
    So, I successfully converted a book with old ASCII Cyrillic font to Unicode Opentype font.

  • JS:CS3 Newbie needs help! find/change character styles

    I'm new to scripting and JavaScript is giving me a headache, but I'll keep trying. What I'm trying to do is automate a few things so that the production time of our school newspaper is reduced while insuring accuracy.
    I've played around a little with the text find change sample and the changing or adding paragraph styles in the InDesignCS3_ScriptingGuide_JS.pdf and I barely understand what I'm doing.
    When us page designers receive text to place in the document, our editors mark the text with tags like: < b >text< / b >, where the word "text" is to be bolded. (there wouldn't any spaces between < and b and > etc. I just did that so It'll show up here). We have basic character styles and paragraph styles set up, and we just started working with nested styles.
    Is there a way we can search for the < b > tag and bold everything after it up until the < / b > tag? Sort of the way it does for html (the way it would do for this message if I took out the spaces). It'll be great if it could remove the tags as well, but if not, I know I could create a find/change script to do the removal afterwards.
    I appreciate any input.
    Thanks!

    You've not found yourself the easiest of tasks! You need GREP find/replace, not text. Do you have any experience with GREP? It's worth investigating, it's a powerful feature. The script below handles bold. For clarity, it doesn't do any error checking: it assumes that there's a document with text in it and that the document contains a character style called 'bold'.
    // talk to Indesign, nobody else
    #target indesign
    // reset the Find/Change dialog
    app.findGrepPreferences = app.changeGrepPreferences = null;
    // find everything between <b> and  (including these codes)
    app.findGrepPreferences.findWhat = '<b>.+?</b>';
    // add 'bold' style
    app.changeGrepPreferences.appliedCharacterStyle = 'bold';
    // make the changes
    app.activeDocument.changeGrep();
    // now delete the <b> and </b> codes
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = '</?b>';
    app.changeGrep();
    You can adapt it easily to handle other codes, and at a later stage you could generalise it so that you needn't repeat whole bunches of code.
    Good luck with your first forays. Again, it's not the easiest of tasks, but it's worth getting to grips with.
    Peter

  • Find/Change HELP

    Hi,
    Anyone know the code for find/change command on text for specific pages?
    Example: I want to change some text from page 20 to 40 -
    Please help

    There is no such code.
    You can select all the text you want and apply your changes to "Selection" only. (Of course you can only select contiguous text -- that is, all of the text frames should belong to a single running story.)

  • Help with uppercase letters in Find/Change

    Hiyis. I'm trying to change all instances of "US" to "U.S.," but when I type it into Find/Change, I'm getting stuff like "discuss" highlighted. Any way to specify just uppercase US on its own? Or do I have to go through and review every suggested change?
    Thanks tons!

    Click the icons for case sensitivity and whole word in the dialog:

  • I am trying to authorize my computer and I get an error message: The required directory was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed. Help?

    I am trying to authorize my computer and I get an error message: The required directory was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed. Help?

    I used Terminal to change the permissions on the folder in question.  I followed the instructions in this article:
    iTunes: Missing folder or incorrect permissions may prevent authorization
    In my case, the folder was there, so I needed the command to change permissions on the folder, not to create one.   I was hesitant to use Terminal b/c I know that if I made an error I could wipe out my hard drive or render my computer unusable.  So to be SURE I didn't make an error, I carefully copied the command from that page and *pasted* it into Terminal.  Also, before I could do anything in Terminal, I had to go change my admin password (it had been a blank password before and that's not acceptable for making changes in Terminal).  I was just super careful when entering my password or doing anything else while Terminal was open (making sure I didn't accidently hit the spacebar or another key, etc.)  And it fixed the problem right away.
    What was confusing for me was that the iTunes error message said to change permissions in the FINDER, which is what I was trying to do.  It didn't mention Terminal.  What would really be helpful is if Apple included a link to a page like this in their error message.

  • How to Open Find/Change with menuAction

    Hi,
    Read the question carefully I'm asking how to open the Find/Change
    dialog, not how to toggle it.
    Toggling is easy enough:
    app.menuActions.itemByName("$ID/Find/Change...").invoke();
    But if it is open, this will close it, and vice versa.
    I'm wondering if there's any way to specifically make sure it's opened?
    Thanks,
    Ariel

    Hi Ariel,
    This probably won't help but see https://forums.adobe.com/message/4413557#4413557
    If you could perform some action that will fail if the panel is closed then you could use a try catch to determine its state.
    I'll leave it to you to think of what that action would be.
    Trevor

  • I have lost my ipod touch 4g 32gb i have the serial number and i dont know how to find ? plz help

    i have lost my ipod touch 4g 32gb i have the serial number and i dont know how to find ? plz help plz plz plz plz email me if you want the serial key my email is [email protected]

    Unless you had already set up
    Apple - iPod touch - How to set up Find My iPod touch
    there is nospecial way to locate your iPod,  Apple will not help.  Your SN is only good for identifying the iPod as yours if it is found.
    Change the passwoard for all accounts used onthe iPod and report it to the police. Also see:
    Reporting a lost or stolen Apple product

  • Finished script: Use grep find/change to fill in a supplied table of contents

    This script is now complete, and has been the subject of most of my previous posts. Just in case anyone wanted to know what the finished script ended as, here it is.
    Thanks so much to all. A lot of really helpful folks on this board are very responsible for the success of this task. This script is to be one of hopefully many in the creation of our records. But it's a huge leap forward. Thanks again to everyone that helped.
    Cheers,
    ~Nate
    Task:
    Automatically find town names in listings, and fill in table of contents template on page 2 accordingly.
    Example of page 2 toc, initially:
    Example of a page of content. The town names are what need to be referenced on the TOC:
    Example of page 2 toc once script is finished:
    Because of the need to include the transaction dates on the TOC (comes as a provided, tagged-text file), a simple Indesign-generated TOC can't be used alone.
    This script uses an Indesign-generated TOC that's on a master page called "T-tocGen" ... It then uses grep search and replaces to grab the needed information, and insert it into the page 2 TOC.
    The script will update a generated TOC and then search for an instance of a page number, and town name. The generated toc lists all included towns in the following format:
    (line start)## tab townName(line end)
    In Grep, this would be (please note, extra \ for \d and \t ... javascript needs that for some reason):
    ^\\d+\\t(.*)$
    After the script gets the info it needs from a found instance of the above, it replaces that line with "---", to prevent that line from being picked up once again.
    The script with then place the needed page number in it's rightful place on page 2, replacing the XX.
    A while loop is used to repeat the above process until there are no longer any instances of "^\\d+\\t(.*)$" present.
    Not every town runs every issue, so once the script is done, it removes all remaining instance of "XX" on the page 2 TOC.
    FINAL CODE:
    TOC replace
    This script will use grep find/change methods to apply page numbers in
    tocGen to the XX's on page2TOC.
    // define the text frame of generated TOC
        var tocGenFrame  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
    // udpate generated TOC ... store contents in tocGenStuff
        var tocGenStuff = updateTOCGen();
    // set variable for while loop
    var okGo = "1";
    // while okGo isn't 0
    while(okGo.length!=0)
    // get town info from tocGen
    getCurrentTown();
    // replace XX's with tocGen info
    replaceTown();
    // grep find ... any remaining towns with page numbers in tocGen?
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // set current value of okGo ... with any instances of above grep find in tocGen
    okGo = tocGenFrame.findGrep();   
    // grep find/change all leftover XXs in page2TOC
    app.findGrepPreferences = app.changeGrepPreferences = null;       
    app.findGrepPreferences.findWhat = "^XX\\t";
    app.changeGrepPreferences.changeTo = "\\t";
    app.activeDocument.changeGrep();  
    // clear grep prefs
    app.findGrepPreferences = app.changeGrepPreferences = null;
    //  functions                  //
    function getCurrentTown()
    // grep options   
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // grep find:  startLine anyDigits tab anyCharacters endLine
          app.findGrepPreferences = app.changeGrepPreferences = null;
          app.findGrepPreferences.findWhat = "^\\d+\\t(.*)$";
    // get grep find results      
    currentGen = tocGenFrame.findGrep();  
    // store grep results content into currentLine
    currentLine = currentGen[0].contents;
    // match to get array of grep found items
    currentMatch = currentGen[0].contents.match("^\\d+\\t(.*)$");
    // second found item is town name, store as currentTown
    currentTown = currentMatch[1];
    // change current line to --- now that data has been grabbed
    // this is because loop will continue as long as the above grep find yields a result
           app.findGrepPreferences.findWhat = "^\\d+\\t"+currentTown+"$";
                  app.changeGrepPreferences.changeTo = "---";
                tocGenFrame.changeGrep(); 
    function replaceTown()
    app.findChangeGrepOptions.includeLockedLayersForFind = true;
    app.findChangeGrepOptions.includeLockedStoriesForFind = true;
    app.findChangeGrepOptions.includeHiddenLayers = true;
    app.findChangeGrepOptions.includeMasterPages = true;
    app.findChangeGrepOptions.includeFootnotes = true;
    // find: XX currentTown .... replace with: currentLine
        app.findGrepPreferences = app.changeGrepPreferences = null;
        app.findGrepPreferences.findWhat = "^XX\\t"+currentTown+" \\(";
        app.changeGrepPreferences.changeTo = currentLine+" \(";
    app.activeDocument.changeGrep();   
    function updateTOCGen()
    //set vars ... toc text frame, toc master pag
        var tocGen  = document.masterSpreads.item("T-tocGen").pages.item(0).textFrames.item(0);
        var tocGenPage  = document.masterSpreads.item("T-tocGen").pages.item(0);
    //SELECT the text frame generatedTOC on the master TOC
        tocGen.select();
    //Update Table of Contents by script menu action:
        app.scriptMenuActions.itemByID(71442).invoke();
    //Deselect selection of text frame holding your TOC:
        app.select(null);
    //store contents of toc text frame in variable
        var tocGenText = tocGen.contents;
    //return contents of tocGen
        return tocGenText;

    Thanks for the reply.
    You are correct but the problem is there are three rows, One row is 100% black, the second is 60% black and the third is 40% black. I want to change the black to blue, the 60% black to an orange and the 40% black to a light shaded blue. In the find/change option you can select the tint you want to find and replace but yea.. does work on table cells.. oddly enough.

  • Is there a way to find/change the font of numericals only, within a document in indesign?

    Is there a way to find/change the font of numericals only, within a document in indesign?

    It might not be what you need for this document, but if you were creating it from scratch, a GREP style would probably be the way to go. That way,  new figures added to the text will  automatically be styled the way you like.
    Start with a base Paragraph Style (i.e. 'Body') that all subsequent styles ('Heading' etc) are based on. Select a figure, and apply the font and any other attributes required. Select it and make a new Character Style. In your Paragraph Style, go to GREP Styles, and set it to apply the Character Style to the 'Any Digit' Wildcard.

Maybe you are looking for