InDesign Grep: How to add a tab before and after a certain number

What would be the expression grep to find and replace the following text:

A paragraph begins with a number (may be more than one) followed by a space and a text. I want to replace it with a tab character before the number (meaning: beginning of paragraph) and another tab after the (or numbers). Thank you very much in advance

OK, try ^ (\d[^\s]*)(\s+)

Tags: InDesign

Similar Questions

  • How can I add points mark before and after every comma in TextEdit?

    Hello world

    I have a fairly big translation file CSV that I need to change and I'm wondering how to do this without having to do it manually.

    I want to add points mark before and after every comma of the document.

    Currently, my text looks like this:

    Account information, information of the affiliate account, affiliate

    Credit, Credit affiliate, affiliate

    Membership discount, discount affiliate,

    Email, e-mail address of the affiliate membership,

    Home membership, Affiliation home,

    Link, affiliate link, affiliate

    Affiliate Login, login affiliate,

    Name, name of the affiliate, affiliate

    Affiliate, affiliate,

    And I need it to be like this:

    "Total account", "Account balance",

    "Reach account balance', ' the account balance - door."

    "Account setup", "Account setup",

    "E-mail account", "E-mail account",

    "Account Information", "Account information",

    'Account Manager', 'Account manager',

    'New account', 'New account',

    'Account settings', 'Account settings',

    Tips that would help me to do it is more than welcomed.

    Thank you!

    I suggest the 'best' way to do may not be via AppleScript itself.

    AppleScript can do, but his text, the analysis is heavy, while the shell commands handle this with ease (although they are not as easy to read).

    That said, here is an example of AppleScript - the converted text will be written to the file "output.csv" on your desktop.

    game dittos to (Choose file)

    the value of output of {}

    the value question in paragraphs of (read (dittos) as text)

    Repeat with eachPara in question

    the value my entry point text delimiters to ",".

    the value $thisline for text elements of eachPara

    the value my text item delimiters to quote & "," & quote

    copy (quote & ($thisline as text) & quote) to end of output

    the value my point text delimiters to ASCII character 10

    set this to output as text

    end Repeat

    game of outputFile to (open access file ((path to the Office as text) & 'output.csv' in the text) with write permission)

    outputFile folklore of the value to 0

    write this as text to outputFile

    outputFile close access

    As you can see, it is heavy, especially compared to a few lines of shell script, but it should you get.

  • How to add a tab before the placeholder separator (1, 2-3) for an independent (from markers) index for a document (book, a document in the book, not)?

    I use Framemaker 11

    Normally, for an index standard for a book, I add a tab before the separator placeholder (1, 2-3) to reach the following of my index format. The tab is added to the reference page before the "1: 2-3" and it translates back to the body page and then easily apply the paragraph format, I can add a dashed line (see results below)

    Text stream (note the before tab '1, 2-3'result obtained with formatting illustrated )
    1.PNG2.png


    However, when I try to do the same thing for an independent index of manufacturers, he can't. I can add the tab before the placeholder separator "1, 2-3", but she does not return to the body page. Is there a way to achieve the same formatting (right dotted tab) for a stand-alone markers index?

    Works for me. You choose the special > Index of > markers for re - generate the IOM file after setting things for tabs?

  • How to compare a photo before and after change?

    I can compare the picture between after and before edit with Lightroom, can I do it as well with CS4?

    Thank you

    Mitch,

    My hunch is that you're talking about a RAW file in Adobe Camera Raw, aren't you?  If so, you should have said so.

    Are there any side-by-side before and after comparison in ACR as there are in Lightroom.  However, in the dialog box overview of ACR, checking and unchecking the box preview switches the front and after the views of your raw file.

    Moreover, few of us use Lightroom (I tried myself and completely despised it), which gives us an example of a Lightroom keyboard command you is not good here.

    What is more, you should post in the Adobe Camera Raw forum:

    http://forums.Adobe.com/community/CameraRaw

  • How to replace the spaces before and after a Word with tabs using GREP or search - replace

    Here's the scenario:

    I have a paragraph with spaces (can be 1 or more) at the beginning (before the first word) and a single space after the first word (is be a number if this matter - which may be a single digit or more).

    I'm looking to replace the spaces before each paragraph with a single tab and replace one tab so of space after the first word (number). In addition, I would like to apply a paragraph style to it.

    Thank you very much in advance for anyone who can find a solution. It sounds like a solution of some sort GREP but can't nail. Thank you.

    ^(\s+)(\S+)(\s+)

    and replace with \t$2\t and define the change of setting fit your style.

  • How to get the part of string before and after a character

    Hi all

    How to get the string before and after the comma character)

    Ex: The string contains the value John Kennedy

    I need the output as first stirng - John

    Second stirng - Kennedy

    Create table names (fullname varchar2 (20));

    insert into values of names ("John, Kennedy");

    insert into values of names ("papa ibra, Shan");

    insert into values of names ('Don Bosco'),

    Select * from names;

    Expected results

    FullName firstname lastname

    John, Kennedy John Kennedy

    Nicolas, Nicolas Shan Shan

    Don Bosco Don Bosco

    Please let me know how to proceed

    Thank you

    Hello

    This proves what I said before, on 0 and several commas commas.

    If we add these 3 rows to the sample data you posted:

    insert into names (fullname) values ("tou").

    insert into names (fullname) values (' David, Lloyd, George ");

    insert into names (fullname) values ('J, R, R, Tolkien");

    then the query I posted earlier produced these results:

    FULLNAME FIRSTNAME LASTNAME

    -------------------- -------------------- --------------------

    John, Kennedy John Kennedy

    Nicolas, Nicolas Shan Shan

    Don Bosco Don Bosco

    TOU tou

    David Lloyd, George David Lloyd, George

    J, R, R, Tolkien J R, R, Tolkien

    If you prefer to get these results:

    FULLNAME FIRSTNAME LASTNAME

    -------------------- -------------------- --------------------

    John, Kennedy John Kennedy

    Nicolas, Nicolas Shan Shan

    Don Bosco Don Bosco

    TOU tou

    David Lloyd, George David, Lloyd George

    J, R, R, J, R, R Tolkien Tolkien

    then you just change line 1:

    WITH got_commapos AS

    (

    SELECT FullName

    , INSTR (fullname, ','-1) AS commapos-* CHANGED *.

    Names

    )

    SELECT FullName

    , SUBSTR (fullname, commapos 1, -1) AS a first name

    SUBSTR (fullname, commapos + 1) in the FORM name

    OF got_commapos

    ;

  • I'd like to produce consistent spacing before and after the section headings in the table of contents

    Hello

    I am trying to create a style for the entries of table of contents for the titles of the books section. I would have a little more vertical space between these securities and two other section titles or sub-section titles, like so:

    Section 1

    Paragraph 1 a

    Paragraph 1(b)

    Section 2

    Section 3

    and so on. To do this, I can easily add a space before and after the space for the section title style. The problem comes when there are two titles with no intermediaries paragraphs, such as 2 and 3 in the example above. Then, the space between these titles is double. If I set is a nonzero value space before or after the space, but not both, then the titles won't be correctly spaced in areas where it has paragraphs either below or above a section title. Does anyone know how to get a uniform spacing?

    Thanks in advance for any advice!

    Make a third style for the case where there are two titles of section together.

  • GREP: How is it possible to place a (for example) "*" before and after the text in bold with GREP?

    Hello.

    I have a string of text as such:

    I want to use GREP to insert a "*" (asterisk) before and after each "BOLD" part. I can do it with GREP?

    (if the asterisk is a problem, I can use a different character)

    Any help would be appreciated.

    Hi Schmaltzkopf,

    Try this:

    Have fun

  • How to add the chapter name and page not for reference

    Hello

    How to add the chapter name and page not for reference in indesign CS6.

    Thank you

    Please try variable notion of text

  • How to prune a white space before and after the bookmarks?

    Hello

    I hope that someone can help me with some JavaScript to remove the spaces before and after my favorites. I know I have to use regular expressions which I think would be ^ [\t]+| [\t]+$ and I also found a code on the internet but it is related to not favorite channels.] How would change this code work for bookmarks? Thank you.

    // Trim
    function trim(stringToTrim){
    return stringToTrim.replace(/^\s+|\s+$/g,””);
    }
    

    First of all, for this code to work, you must use standard double quotes, not the ones you currently have it.

    For use on a bookmark, you can do something like this:

    var bkm = this.bookmarkRoot.children[0];
    bkm.name = trim(bkm.name);
    
  • How can I include spaces in paragraph before and after in the paragraph styles?

    By specifying the paragraph spacing BEFORE or AFTER a paragraph which differs from the CONDUCT ranging from space, how can I include in my paragraph styles? I'm on a MAC under OS Mavericks.

    Yes, by selecting text/para use space before and after.

    Thank you

    Sanjit

  • How to check before and after in Photoshop?

    Is there a cursor function "before and after", etc. plugin Photoshop cs6 that allows you to see a slider from left to right before and after the image in meansf?

    Hi gropius,.

    From now there is no option if Photoshop to check the image in Photoshop, before and after.

    However, you can consult the following links, they might be useful: Photoshop shortcut: view Original | PhotographyBB

    any keyboard shortcut for comparing before after in photoshop cs3: retouching Forum: Digital Photography Review

    Let me know if it helps.

    Kind regards

    Tanuj

  • When framing key position, how to hide before and after points

    Hey all, just the question (I hope).

    I'm keyframing the position of my transmitter light, and now I have a huge ball before and after points that makes it almost impossible to make position keyframes more. Is it possible to just see the current point or to a limited number of before and after the visible points?

    Thank you

    Screen Shot 2011-12-21 at 4.51.42 PM.png

    If you don't want to watch the keyframes, you can turn them off in the preferences, or Options. You can find Options display under the passage outwards the menu in the upper right of the Composition Panel.

    If you want to click the keyframe in the composition window and drag them around, then you need to keep some of them available. If you want to make fine adjustments with the position of the layer, you can use the values in the timeline panel. If you want more space between the keyframes in the timeline panel, you can zoom in by clicking and dragging the navigation bar in time at the top of the timeline or by clicking on the big mountains small icon of mountains at the bottom of the timeline.

    Sometimes, when I do this kind of adjustments I just disable keyframe indicators, step through the animation, one frame at a time and use the boost to refine the position.

  • Tags: spacing before and after

    I had h1 tags and h2 works very well (that is, with space remove before and after tags), using this code:

    H2 {color: #000000; padding: 0px; margin: 0px; do-family: century gothic; police-weight: normal; do-size: 17px ;}}

    H1 {color: #FF0000; padding: 0px; margin: 0px; do-family: century gothic; police-weight: normal; do-size: 20px ;}}

    But when I added a h3 tag using the same code:

    H3 {color: #FF0000; padding: 0px; margin: 0px; do-family: century gothic; police-weight: normal; do-size: 14px ;}}

    tag spacing normal H reappears after the h3 tag.

    Code for the table which follows the h3 tag is (in the case where it's sort of throwing objects off the power):

    < table class = "special" width = "804" cellpadding = "0" cellspacing = "0" style = "background-image: url(images/flag-exta.jpg)" "

    Only other change I made to the coding as the h1 and 2 labels worked without spacing between them has been to add css coding to solve a border problem, now solved:

    table. Special {border: 3px solid #999 ;}}

    table. Special td {border: none ;}}

    Can't see how more the question of spac h3 code in the table following the h tags or css coding of effects (if I delete the two codes that I still have the problem of space h3).

    Its replacement by " display:inline;' coding for" padding: 0px; margin: 0px; "makes no difference either.

    Appreciate a lot any guidance. Thank you.

    What is happening is that browsers are automatically insert a line break between two tables. Your h1, h2 and h3 are in a single table and the 'special' table is separate.

    Use tables for layout is not a very good idea, especially if a single text is involved. The 'special' table can be an exception.

    Without pulling your entire page, there are two ways you can solve this problem.

    • Remove the table that contains the h1, h2 and h3 headings and make the first line in your "special" table
    • Change the value of margin-top in the special class to margin-top:-1em; (less 1em).

    Also there is a mistake in your CSS online 79. There is a comma after "Times New Roman".

  • before and after the shows difference in white balance even if the photo is not published

    My present Lightroom (white balance) differences between before and after images of the same file, even when the image was published not (the front of the image seems greener). I already checked my import settings and there is no editing during import. The two images, before and after should look exactly the same, but they don t. I have amd using a PC and my files is Nikon Raw or jpeg, it is not serious, the same product no matter the file type.

    antesedepois.png

    This is probably due to a faulty monitor profile.

    Windows 10 is known to install the manufacturer profiles, which are often of poor quality.

    Troubleshooting, as well as a temporary fix, try to set the monitor to sRGB profile.

    I have this solves the problem, ideally you should calibrate your monitor with a standard material.

    Press the Windows key + R, type colorcpland press ENTER.

    Add the sRGB profile, and then set as default profile. See screenshot (from Windows 7) below.

Maybe you are looking for