GREP find and Style

It is some thing I get quite a bit of, I import text unstyled, into ID!
I then do a search for a [A Head] leader to a para and change to "A Head"  para style!
You get the drift I am sure But... what if get a [Bullet] para return, a list of text to be styled followed by [End Bullet]
Can this be done with GREP?
It could make a big difference to my make-up time
Regards
Lou

I ws wondering If my question was a bit cryptic!
What I am doing is importing authors text into the document, I am working on.
The text is not styled but the required styles are flagged with [A Head], [Body Text] [C head], etc.
What I then do is search for these flags, I search for eg.
[AHead]Resources
then change the hilited text to my style for A Headings, which makes the whole paragraph a A Heading. I do a "change all" and all the A headings in my document are styled.
The problematic (for me at least) is when we come to eg. Bullet text this will be flagged so
[bullets]
Recall information
Organise or reorganise knowledge
Use information in a new way
Critically evaluate scientific information
[end bullets]
Is there a way of searching for text between those flags and applying a style to it?
Looking for help

Similar Messages

  • Find and Replace Subscript

    Hi,
    I am trying to figure out how to find and replace subscripted characters, e.g. H2O (with the "2" subscripted). How is this done?

    Yeah, it has two options. Use formatting (e.g., subscript, but also font, weight, size, leading, colour and whatnot) or do not use formatting -- which does not help, as it is the same as your search string ...
    But fear not. If your "H2O" is the only one, you can do this -- what Peter meant with his two-step.
    1. Search for "H2O" and replace it with "H[ha!]O". Be sure to check both "whole word" and "case sensitive" icons below the replace field. Every "2"
    i inside
    a text "H2O" will be replaced by something unique -- that's what the "[ha!]" should be.
    2. Replace "[ha!]" with "2".
    i Uncheck
    "whole word" and "case sensitive" (because elsewise it won't find anything), and in the Replace Formatting field, select "Subscript" in the Type panel. This 2nd time, you are only replacing the unique string that was put into its unique position in the previous step.
    A 2nd option (one that I don't recommend to freshmen!) is to use the GREP Find-and-replace. This is, in the right hands, an extremely powerful tool, which can
    i search
    for "H2O" and
    i change
    just the "2" part. If I only knew how, off the top of my mind! But, it's neither an easy to remember shortcut, nor perfectly logical, and the 2-step method is.

  • GREP 'find/change' by list script: find a text string containing different para styles

    Hi
    I'm don't write scripts but do 'enjoy' copying, pasting and changing existing code/txt files.
    I have built a GREP find/change .txt that performs a large number of text edits/changes.
    But I'm left with an issue where I have paragraphs of text (styled earlier in the .txt file) that I'm unable to identify using GREP the usual way. I need to identify text in a particular paragraph style, followed by text in another paragraph style.
    Is it possible with GREP to create a search string to find: text styled with one paragraph style, ending with a paragraph return, and to include in that selection the following paragraph/s styled with another paragraph style?
    MTIA Steve

    seb400 napisał(-a):
    What do you mean by I would mark "changing" in "copying, pasting and changing"?
    Hi Steve,
    I mean I can see a way by modifying some existing code with "find...change" job
    1. set criteria to findGrep
    2. store findGrep() in an array
    3. check each found object if next paragraph matches some new criteria
    4. run changeGrep() if true
    Jarek

  • Find and replace by text and style

    We have a fairly large RH HTML project (300+ topics so far)
    most of which have a specific heading in Heading2 style. We want to
    change all of these to a style based on Heading2, but not use the
    Heading2 style b/c we don't want them to show up in the TOC. I have
    created a new style and can obviously open every topic and manually
    select and change each one - but I'm hoping that one of your RH
    gurus will tell me an easier way. Is there anything comparable to
    MS Words Find/Replace that will search the whole project for a
    specific word in a specific style?

    RoboHelp's Multi-File Find and Replace (in the Tools tab)
    should be suitable for this job, and you can control each
    occurrence as you choose. (Where this RH utility fails is when your
    search string might sit on more than one line, which won't be the
    case here.)
    You'll run two replacement passes (spaces added to < &
    > tags for proper viewing in this forum):
    Replace < h2 > with < p class=YourNewStyle >
    Replace < /h2 > with < /p >
    The < h2 > and < /h2 > strings will never be
    split between lines, so RH will catch every one.
    BTW, Add me to the list of FAR boosters; it'll let you change
    case, change file names, etc., etc., etc. Great tool!
    Good luck,
    Leon

  • How do I remove a space before the first word in a sentence using find and replace or GREP?

    Right, so I am laying out a document in inDesign from a word document and it has a space before every first word in a sentence. It is really annoying and I need a quick way to get rid of them. I wasn't too sure how to do it with find/change but I am sure there is a way in GREP if someone can help me. I have included an image so that people can see exactly what I mean.

    The ^ location works for all paragraphs.
    But a note to the OP, there is a sample script called FindChangeByList that removes leading and trailing spaces as well as extra spaces after punctuation, all in one go. But if you want to continue to use a GREP find/change to remove leading space, I'd modify Joel's suggestion to ^\s+ to get those cases where the user typed multiple spaces as well.
    And don't forget there are actually legitimate places for leading tabs, which both the script and this GREP will find and remove, so be careful.

  • Find and replace a table style

    I have about 10  table styles in a document and I want to replace all of them with the #1 table style. Can this be done with Find and Replace?

    You'll need to do this for each of the Table formats that need to be replaced.
    Let's assume the desired format is "Format A" (a default FM style), and one of the formats to be changed is "Specs 2".
    Click in any instance of a Specs 2 table.
    In the Table Tag field, pull down and click on [Format A].
    Click Commands > Global Update Options:
    (*) All Properties
    (*) All Tagged [Specs 2]
    [Update]
    If it works properly, you'll get a dialog:
    OK to change all Format B tags to Format A?
    [OK]
    Additional global updates may be required to clean up any overrides.
    Trying this on FM7 at home, it didn't always work. I don't know if newer versions are more stable. Personally, I never do it this way (probably because of prior experience), and I usually just hack the MIF.

  • Do there is any way to redefine styles by find and replace or script

    I have a some styles and i want  to change same things in all styles like language, align and numbers digit and etc....,
    So I ask if  there is an easy way  to do that except modify each style manual, like script?, I use inDesgin CS3, and CS4
    Like in Find Font there is option to redefine styles but that for fonts only, So there is way to do that by find and replace ?
    Thanks

    I'm not a "scripter" and I don't have a huge knowledge of what scripts are available, unlike some on here, but this is how I'd do it if I couldn't find what I wanted by googling.

  • Rename Layers: Find and Replace style renaming

    In Illustrator, you can use the following to find and replace layer names:
    var doc = app.activeDocument; 
    // name indexed object 
    var layernames = { 
    'Bob':'Bob Front'
    // loop through all layers 
    for (var i = 0; i < doc.layers.length; i++) 
    //Set up Variable to access layer name 
    var currentLayer = app.activeDocument.layers[i]; 
    if (layernames[currentLayer.name]) 
      currentLayer.name = layernames[currentLayer.name]; 
    In this script "Bob" will become "Bob Front". Is there something similar for Photoshop. Looking at the Photoshop scripting guide, this script should work as the active App document and layers methods exist in Photoshop.

    c.pfaffenbichler wrote:
    What are
    var layernames = {
    'Bob':'Bob Front'
    and
    if (layernames[currentLayer.name])
    supposed to do? Is that even JavaScript? …
    Hi c.pfaffenbichler, yes, this is pure Javascript.
    Try this little example:
    var layernames = {'Bob':'Bob Behind'};
    alert(layernames['Bob']);
    // a variant
    layernames['Bob'] = 'Bob in the middle';
    alert("a variant:  " + layernames['Bob']);
    // another variant
    layernames.Bob = 'Bob Front';
    alert("another variant:  " + layernames.Bob);
    @big_smile,
    your posted script works with photoshop (if you have only artlayers and one or more layers named with Bob)
    var doc = app.activeDocument;
    // name indexed object
    var layernames = {'Bob':'Bob Front'};
    // loop through all layers
    for (var i = 0; i < doc.layers.length; i++) {
        //Set up Variable to access layer name
        var currentLayer = app.activeDocument.layers[i];
        if (layernames[currentLayer.name]) {
            currentLayer.name = layernames[currentLayer.name];
    All you have to do is to loop trough all artlayers (and layersets), but here is Javascript a slowly variant. Use ActionManager code instead. You will find many examples here in forum.
    Have fun

  • Need to global find and scale and resize frame on a linked graphic

    I have a whole set of files that contain multiple instances of an icon set (placed AI file). All of these are formatted to flow in the text as anchored objects with various object styles. I need to make sure that all instances of the placed AI icons are scaled to 30% and that their frames are fit to content. I have a LOT of files and each one has at least 20 of these icons. I thought the Object find and replace would help, but unfortunately it will not let you search for links, and while I can search for the object styles, there's no option to change scale and the fit content options does not have the "fit frame to content" (and doesn't work anyway from the few tests I ran using "fit content proportionally"). 
    Does anyone have any ideas for how I can fix this globally in nearly 500 documents without having to manually select each icon and change the scale and apply the fit frame to content? I've done a handful of files this way, and it's VERY time consuming.

    First make sure this works by duplicating a file and testing.
    Make 1 image the size you need it
    Grep search for
    Find
    ~a
    Change to
    ~C
    if that doesn't work then try ~c (lower case) I can't remember how that works
    If it does work - then you can open 2 documents and choose "All Documents" in the Search field.
    If it's fine on 2 docs - then I'd say go ahead and do the rest.
    I stress to please use a duplicate set of files in case things go bad.

  • [GREP] – find/replace only first comma in paragraph

    Is it possible to find and replace only the first comma in paragraph with certain paragraph style with end of paragraph character using GREP search? Or in other words – to split paragraph into two paragraphs by replacing the first comma in paragraph with end of paragraph character?
    Claudius

    That's an interesting problem, and I think it takes at least two steps.
    The expression (^[^,]+),\s* will find all text from the beginning of a paragraph up to the first comma, which might be followed by whitespace and allows you to use the $1 operator in the change to field to save the text up to the comma, but replace the comma and following whitespace with anything you like. However, as soon as you replace that with a paragraph break you've created a new paragraph to search and you end up breaking at every comma.
    Instead you need to insert a stand-in symbol of some sort with a unique character style applied (so it won't get picked up any other way), for instance change to $1% and apply the style named "break" which does no formatting but flags the text for the next search.
    Now search for % with the "break" style and replace with the paragragh break (and no style).
    You should probably now search for .+ with the break style and change to nothing (or $0 for found text), and remove the style, just to be clean.
    There's still one problem, though, and that's that all the new paragraphs start with a lower-case character unless the first word after the comma happened to be capitalized. You could now search for ^. to find the first character in each paragraph and use the change format to apply a character style that assigns all caps, but that's really an ugly way to work.
    All of this will fall apart, too, I think if you have nested or GREP styles affecting the beginning text or the first character in any paragraph that you wind up with.

  • Text or GREP find/change method to assign tags

    Hi all
    I could use a text or GREP find/change method to  assign tags to paragraph styles (for use in FindChangeByList), would anyone be able to help please?
    Steve

    Hi Peter
    I produce a quarterly magazine for which text is supplied in Word format.
    I currently run the 'FindChangeByList' script to format body text, headings, bulleted and numbered lists, web and email address text styling and to remove/correct all extraneous characters etc.
    Once the job is printed I need to produce a tagged 'accessible' readable (eg: read out loud function in Acrobat) pdf from the file, for text to speech readers.
    I am currently using the map tags to styles function, which allows me to assign tags which in turn gives me control of the 'text reading' order.
    What I'd like to be able to do is automatically apply the Tags to syles while processing the 'FindChangeByList' script.
    Steve

  • How to find Object Styles

    Hello,
    Adobes Scripting Guide: JavaScript explains well(more or less) how to find text, greps and glyph. But lacking is how to find Object Styles. The Find/Change Dialog box in ID does have this option.
    What I would like is a script that will find a style, then fill in the color of that style so that one can clearly see in a long document where the style was used. When there are only subtle differences between styles, this is helpful.
    The first thing to do is to clear all the options and that is my first stumbling block. In the following code the first line works, clearing the find of any parameters. The second line does not work.
    app.findObjectPreferences = NothingEnum.nothing;
    app.findChangeObjectOptions = NothingEnum.nothing;
    I also need to set the Search for Documents (not All Documents nor Selection) and to set the Type for All Frames.
    The second obstacle is setting the Find so that it will find the object I am looking for. The code below does not work but I do not know why.
    app.findObjectPreferences.getElements("Object Style 1");
    Any help is appreciated.
    Tom

    You need this:
    app.findObjectPreferences = null;
    app.findObjectPreferences.appliedObjectStyles = "Object Style 1";
    found_objects = app.activeDocument.findObject();
    Some things are different in scripting compared to the interface. For instance, the scope of the search in the interface is just "document" or "all documents", but in a script you can search a page, a spread, almost anything (I have to say that this is true for text and grep searches, I never tried it for objects). Finding frame types is different as well: there's no parameter for that I don't think. Instead, you have to find all frames that have a particular object style applied to them, then cycle through them checking their frame type; if the type matches your criteria, do what you want with it.
    Peter

  • Find and replace m2 and m3 to subscripts

    Now I change m2 and m3 to what on the clipboard.  But that doesn't work when I have m2 and m3 in different colors and different fonts tru the lay-outs. 
    How can I find and replace m2 and m3 to m subscript 2 and m subscript 3?
    Only m2  not 2 alone.
    Many thanks

    Your "Only m2 not 2 alone" seems to contradict what you wrote earlier, but I guess that what you want is to style 2 and 3 only when they are preceded by m. If that's the case, do this in the grep tab of the Find/Change dialog:
    Find what: (?<=m)[23]
    Change to: <leave empty>
    Change format: select subscript.
    (?<=. . .) is a so-called lookbehind, [. . .] a character class. (?<=m) means 'preceded by' and [23] stands for '2 or 3'.
    Peter

  • Right-indent tabs in GREP or nested styles

    How do you specify a right-indent tab (shift-tab) in GREP or nested styles?  Is it possible?  I could only find the regular tab character.
    Thanks, Phyllis

    In GREP it looks like
    ~y
    Mind you, I don't know if that will work for you - I just copied a right-indent-tab to the clipboard and pasted it into the GREP Find What field.

  • XML tag markers moved: Find and Replace causing problem in xml elements

    Hi All,
    I am doing find and replace using GREP. While using the expression like $1, $2 (Found Items) in the change to field it changes the placement of tag marker. If the found item is a part of two of more xml elements, I am getting a serious problem while replacing it. (ie. The xml tag markers are moved.)
    See the screen shot below, then you may get better idea. And help me to overcome this issue.
    This is just an example to show you what i'm trying to say, there are so many cases like this.
    Original text/ Before doing find replace
    After replacing
    Green4ever

    Hi Peter and John,
    but it seems to me that the example is looking for any space that
    follows a semi-colon and has two word characters following it, and
    repalce that with an em space. I think you could do the same using look
    behind and look ahead and not need to replace the found text.
    Yes you are right about the look behind and look ahead. I'd like to show some more examples to show what the actual problem is,
    Original/Before Replacing,
    (Consider there is another case here, instead of em-space some times normal word space will also be there)
    Using the Grep:
    Find What---------> ^(\d+\.(?:\d+)?)~m
    Change To------------->$1\t
    After Replace:
    Did I make any sense? Eventhough this will not make any changes in the layout, my requirement is to insert the tab out-side the tag marker not indise.
    Green4ever

Maybe you are looking for

  • Convert Word to PDF with a Digital ID?

    Hi, I am looking for a solution to automate the process of adding Digital ID's to PDF's. Whenever I create a PDF from a Word Document with the Adobe PDF converter plug-in for Word I want it to add a Digital ID (certificate security) to that particula

  • Printing on OS X 10.8.5 & Canon iPF6100

    I have Photoshop CS4 and up graded my computer to an iMac, with OS X 10.8.5. I have a Canon printer imagePROGRAF iPF6100. I have download the necessary drivers from Canon. The iMac see the printer and have done a nozzle check through the iMac. When i

  • RRI Jump problem

    This is regarding the RRI jump. I am trying to jump from a report to a transaction. All the assignments are made to be generic. Now the problem is that when I try to execute this jump I get a warning stating that “Selection for InfoObject cannot be u

  • Casting profile properties to ArrayList

    I have a piece of code that is currently generating a casting exception... I inherited this so I don't know if it even works right. Could someone point me in the right direction as to how to fix this? Here's some of the code in question: public void

  • NFC Netflow collector 6.0 & Solaris Cluster

    Hi all we are deploying billing systems solutions using NFC. Details as attached image details are as follows: - All devices on (7600 and 6500) the network is responsible for pushing information on NFC system (called the billing collection system - B