How to use GREP to apply the character style just for the first and the second line of the paragraph?

as the title, I just want to ask how to apply the style of character just for the 1st and 2nd line of the paragraph. Help me pls, tks!

Can you show the screen shot with the invisible market, looks like you feedback after each line.

So, something like this would work where I have a return forced for the linebreak (shift + return). The example on the right does not work because the line break is a return:

Tags: InDesign

Similar Questions

  • How to apply a character Style that has already been made in a document model?

    First of all, I would like to thank everyone who helps. I am a complete newbie to the script and appreciate your help.

    I mainly use GREP expressions to search for patterns in a document and apply a character Style that has already been done. This character style did not help script, but just in InDesign when the production and implementation of the model.

    var myDoc = app.activeDocument;
    
    
    //Clear the find/change grep preferences.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    
    //Set the find options.
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    
    //GREP Expression for finding all HEADERS
    app.findGrepPreferences.findWhat = ".+\n";
    
    //Applying formatting changes to put into All Caps, Bold and changing the font size to 12 pt.
    app.changeGrepPreferences.capitalization = Capitalization.allCaps;
    app.changeGrepPreferences.fontStyle = "Bold";
    app.changeGrepPreferences.pointSize = "12";
    myDoc.changeGrep();
    
    //Clear the find/change preferences after the search.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    

    This is how I currently. I will manually define the changes made to the text. The problem is, each model uses a different set of fonts and not all use them "BOLD", for example Sabon can use THIS "BOLD".

    I would like to know how to apply a character Style and tried to look, but nothing seems to work.

    Any help would be appreciated.

    Thank you.

    app.changeGrepPreferences.appliedCharacterStyle = "A";

  • How to apply a character style to url an email?

    Mac-Indesign CC

    I am trying too use a grep style to apply a character style to url an email?

    Is this possible?

    Better to consider Nina Storm

    Hello

    Try this:

    [^\s]+@[^\s]+

  • Try to use GREP to identify the beginning of a paragraph

    I want to apply a character style to the first sentence of a paragraph. The challenge is that these are not always traditional phrases. They may begin with a decimal point or a number. Here are a few examples.

    7.25 "bracelet diamond accent. Sterling silver. Reg. $340
    Would that the character style applies to "7.25" bracelet diamond accent. »

    .04 CT tw. Bracelet bracelet of diamonds to shine. Sterling silver. Reg. $720

    Would the character style applies to '04 CT tw. Bracelet Diamond by sparkle bracelet. »

    Diamond accent earrings. Sterling silver. Reg. $120

    Would the character style applies to "diamond accent earrings.

    I used [\l\u\d\.], but which apply the character style to too much text. I added the ^ at the beginning of the code, but that do not accomplish what I want to do, either.

    Thanks in advance for any ideas on that.

    Or this one: ^. +?. ( ? =\s\u)

    (from the beginning of the first paragraph point which is followed by a space a capital).

    Peter

  • I got a license number for Adobe Master Collection from my school (Stevens Institute of Technology) and I can't understand how to use it to obtain the product. I created a user name and this is as far as I'm away.

    I got a license number for Adobe Master Collection from my school (Stevens Institute of Technology) and I can't understand how to use it to obtain the product. I created a user name and this is as far as I'm away. I need to download the product and I may not know where to start.

    Ask someone to your school... You have a Cloud redemption code, or a number of series CS6?

    If cloud, http://helpx.adobe.com/x-productkb/global/redemption-code-help.html Redemption Code and

    http://www.Adobe.com/products/creativecloud/FAQ.html

    http://helpx.adobe.com/creative-cloud/help/install-apps.html to install or uninstall

    http://forums.Adobe.com/community/download_install_setup/creative_cloud_faq

    What is http://helpx.adobe.com/creative-cloud/help/creative-cloud-desktop.html

    To start https://helpx.adobe.com/creative-cloud.html the Cloud

    If CS6, download to other downloads and enter your serial number when prompted

    Once again, your 1 resource is your school

  • How to use JavaScript to change the named view

    How to use JavaScript to change the named view

    Do you mean to jump to a specific Destination named within a PDF file? SE so there

    the method gotoNamedDest of the Document object.

  • How to use CSS to create the horizontal navigation bar in Dreamweaver CS6

    How to use CSS to create the horizontal navigation bar in Dreamweaver CS6

    One of the ways to do this is the following: Editor Tryit v1.9

    You can also use floats to get something in the same direction.

  • How to use JavaScript to limit the number of boxes to check the user can select a PDF form?

    How to use JavaScript to limit the number of boxes to check the user can select a PDF form?

    Here's the working solution

    Please rename all the boxes like chkBox0, chkBox1... .chkBox30 (must start with 0)

    Value of exports of each checkbox must be "Yes" (default value is Yes)

    Place this Code at the level of the Javascript Document

    -Code JavaScript document-

    var counter = 0;                Checked the meter

    -Count boxes checked again when the document is closed and reopened.

    for (var i = 0; i)<= 30;="">

    If (getField("chkBox"_+_i).value == 'Yes') {}

    Counter += 1;

    }

    }

    -The function of validation-

    function validateCheckBox(name,value) {}

    If (value == 'Yes' & meter)<>

    Counter += 1;

    } else if (value == 'Off') {}

    counter = 1;

    } else {}

    getField ("name") .value = "Off";

    App.Alert ("you can select only four checkboxes");

    }

    }

    -End of Document Javascript-

    Now put this line in the MouseUp event all checkboxes

    Box - Code MouseUp event.

    validateCheckBox (event.target.name, event.target.value);

    //----------------------------------------------------------------------------------

    Hope this will help

    Kind regards

    Post edited by: Mohammad Irfan

  • How can I download videos from my DSLR Sony DHV for later editing and the creation of a DVD?  I just installed Adobe software today and can't find anything about it.

    How can I download videos from my camera Sony HDV for later editing and the creation of a DVD?  I just installed Adobe software today and can't find anything about it.

    I am very familiar with Pinnacle, but I've been disillusioned about their support.

    Ian

    First you connect your device to your computer using your Firewire port, then press F1 and search for capture

    http://helpx.Adobe.com/Premiere-Pro/KB/cant-capture-DV-HDV-video.html

    - and more info on Windows http://forums.adobe.com/message/4708997

    -Legacy driver http://www.studio1productions.com/Articles/Firewire-1.htm

    -All versions of Windows from 7 to 10 need legacy driver!

    This is old, but still a good place to start - CS5-thru-CC body/Encore tutorial list http://forums.adobe.com/thread/1448923 has many links to help learn... including how to still get to create a DVD

  • retention of the words italic when you apply the paragraph style

    When you place text in InDesign, I want to apply a paragraph style, but keep some (foreign) words in italics without having to search for each word and apply the italic character style. Texts are long and not originated by myself.

    The most recommended book for beginners here on the forum is Visual QuickStart of Sandee Cohen for InDesign. The 'bible' in my opinion, for very advanced users is Real World InDesign.

  • I only use CC a year. Can I subscribe for a month and the following year again for a month? (So I don't have to spend so much money..)

    I only use CC a year. Can I subscribe for a month and the following year again for a month? (So I don't have to spend so much money..) I'm talking abozt Dreamweaver CC because I need to renew the site once a year. THX.

    Pricing plans and creative Cloud membership | Adobe Creative Cloud

    You can subscribe to DW for one month per year if you wish.

    Simple subscription App, monthly Plan

  • How can I prevent standard users access records personnel administrator for example. photos and documents

    How can I prevent standard users access records personnel administrator for example. photos and documents

    Hello bh51,

    Did you run your antivirus as well as any spyware removal?  As davidhk requested, then you are able to turn sharing off the coast, but it just doesn't work?   I suggest creating a new folder and move the data, and then see if other users are still able to view these.

    Please let us know status.

  • Can I then set up my new and old iMac to use both for rendering first and consequences?

    Can I then set up my new and old iMac to use both for rendering first and consequences?  No special installation required?

    and...

    If I understand correctly, your ability under the license agreement to install the software

    on the two systems don't allow for simultaneous use on both systems!

    but...

    for EI, there is the "Adobe after effects Render Engine"

    documented here:

    https://helpx.Adobe.com/after-effects/using/automated-rendering-network-rendering.html#NET work_rendering_with_watch_folders_and_render_engines

    "In After Effects CS6 and later versions, you can now run aerender or use spyware file.

    non-redevance rolling mode, serialization not require it. » !!!

    HAHAHAHAHAHAHAHAHAHAHA!

  • Use GREP to apply paragraph styles, character styles not only

    I have a body of text, and in it, I would like to apply a specific style to the paragraphs corresponding to a model. I did a GREP style that applied some changes formatting of paragraphs, I tried that it affects, but in doing so, I found that I couldn't Center these lines using a character style. (The corresponding lines should be centered, and the rest should be left aligned.)

    I was thrilled to learn that the GREP function, then completely disappointed with this limitation. InDesign offers the possibility to automate this, so I must not cross and Center each paragraph corresponding to the hand?

    Thank you!

    InDesign provides a way to automate this so?

    Yes and no. There is no dynamically linked paragraph styles to a paragraph about his boss, but he has at least two alternatives:

    (1) use Grep-F/C

    (2) use the script FindChangeByList or MultiFindChange which is basically automate operations F/C

    HTH

    Loïc

  • How to use GREP expression to group the last two words of a paragraph?

    Hi guys, I'm dealing with a document that is riddled with the orphan and want to use GREP to get rid of them all.

    I found this thread talking about how to group all the last 10 characters. But in my language, you can have up to 4 words together (almost a third of the sentence!) and still not break the limit of 10 characters. So if I use this expression, a sentence cut in half way, which make the whole paragraph looks horrible. I also tried the (\s\w+)? $ expression, but he left a few intact orphans (No. very random, model at all).

    So is there any other expression that can make the last 2 words of any paragraph together like glue stick?

    (\H+?\h ?) {2} $

    (^/)

Maybe you are looking for