Erase the numbers using GREP?

Hi guys,.

Could someone help me please? I only find GREP in inDesign if Im not that clued up on it. I searched the web, but can't seem to find a way to remove the numbers from sequntial a document - is it possible?

I essentially several documents containing some old page numbers in parentheses - is possible to use GREP to search and delete, including the media? That is to say, [1], [2], [3], etc.

Thank you!

Hello

[Of course, try this: \[\d+\]

This will find any number of numbers in brackets, including the media.

Hope that helps.

--

Marijan (tomaxxi)

http://tomaxxi.com

Tags: InDesign

Similar Questions

  • Add commas to financial numbers using GREP

    Hi all!

    Using InDesign CC for this. This is the type of financial numbers that I do business with - $79605.01 - with more than 4 k that I add commas 1 or 2 according to the number. Final result should look like this - $79,605.01-

    So far, use GREP I in the FIND WHAT box \$[.,\d]+ and he tries to find them.  What am I missing or unable to, is what to put in the CHANGE TO box. I tried to \1$, but it does not work.

    I have need FIND WHAT already because what I have works well. I just need the script so that it will add commas to the appropriate locations. Search Google gave me a lot of answers on how to 'find' the numbers, but missing of course in the Department of "set up".

    No a kind soul help?

    Steph

    Your GREP expression returns the integer, which is not helpful in this case. I'm not all that an expert in complex GREP, but I don't see a way to do this only once with a number of variable length, so if you have cases for 1 and 2 required commas, I think you need two expressions and they need run in the correct order.

    (First of all find \d(?=\d{6}\.\d) and change to $0, which will add the comma to millions, then find \d(?=\d{3}\.\d) and change to $0, to add the comma for thousands. These expressions only work if there is a decimal number

  • erase the numberic control

    Hello

    Sorry, but this is a newbie question...

    I have a digital control with a default value (0,0) on my front.

    I want to erase the content when I click on the control so that when the user clicks on the control to enter a value they failed to remove the content...

    any help is appreciated...

    Thank you.

    Ranjeet_Singh wrote:

    Hey Zoomzoomzoom

    Yead I made a mistake, I did not read the question properly. Then best way is via the tab option, I think. Using the property node, it can correct the opening sequence of the tab.

    Is it OK?

    Thank you

    In fact, the other option is to tab to the CNC. It will automatically select the current value, so the user can change. The tab order, however, has hothing to do with the question.

  • Find the URL using GREP

    Hi all

    Request:

    I need to find the end of the URL with ".com", ".org", ".uk", etc. using GREP.

    for example,.

    [email protected]

    [email protected]

    rajjjesz.sir555@gmail. Corp.fr

    ()[email protected]()


    Please help for this request as soon as POSSIBLE.


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

    But, I found the solution for the content to Start with "http" or "www."

    Using the Grep Code Forum is: (? I)(http|www) \S+ [\l\u|\d]

    Concerning

    Siraj



    Hi Siraj,

    Check it out now.

    var doc = app.activeDocument;

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.findWhat = "[a-z0-9!" #$% &'* + / = ? ^ _'{|}] +(?:\ \. [a-z0-9!#$%&'*+/=?^_`{|}] +) * @(?: [a-z0-9] (?: [a - z0 - 9-] * [a-z0-9])? \.) + [a-z0-9](?:[a-z0-9-]*[a-z0-9])? « ;

    var found = doc.findGrep ();

    for (var i = 0; i)<>

    {

    Alert ([i] found. Happy)

    }

    Kind regards

    Cognet

  • change the name of the file using GREP

    Hello

    I try to get these lines of code to change the name of file saving;

    from: zAlcatraz

    to: HAlcatraz

    {if (myDocName.IndexOf ('z')! =-1)}

    var myRegularExpression = / \ < z/IM

    myDocName = myDocName.replace (myRegularExpression, 'H');

    }

    I try to target just the first z in front of each file name, but can not get the correct grep.

    Any thoughts?

    Thanks in advance,

    GR

    Vel code will replace all instances of lowercase 'z' by 'H' capital - even those in the path of the file.

    Better try this:

    myDocName = app.activeDocument.fullName.path+'/'+app.activeDocument.fullName.name.replace (/ ^ z/i, 'H');

    (Looking for the GREP code probably is ' ^'-beginning of the 'line', in this case equal the beginning of the string.)

  • Renumbering of the numbers

    Hi all

    Can someone help me I have a document that contains many said for example that there numberes from 1-100. Here, I want to remove numbers from 1-100 for example say 22, 23 and 23 after the removal of these figures, I want the rest numberes numbering the final number should be 97.

    Im trying with the code but cannot find the answer below.

    myDoc var = app.activeDocument;

    app.findTextPreferences = null;

    app.findTextPreferences.findWhat = "^ 9;

    app.findTextPreferences.position = Position.SUPERSCRIPT;

    var myFound = myDoc.findText ();

    change of var = 0;

    for (var i = 0; i < myFound.length; i ++) {}

    myFound [i] .appliedCharacterStyle = myDoc.characterStyles.item ("Sup");

    {If (myFound [i] .appliedCharacterStyle! = {myDoc.characterStyles.item ("Sup"))}

    app.changeTextPreferences.changeTo = "" + change;

    change ++;

    myDoc.changeText ();

    }

    }

    Thanks in advance,

    Kind regards

    Learner

    So you have to get numbers, no numbers, use Grep to find all the numbers: \d+

    Find all the numbers and replace their contents with the value of the counter of the loop for. no need to bother with that content really is.

    Then you have to work at the end of the numbers found in the beginning because the length of the number wioll change, for example 10 (two digits) can change to 9 (one digit). Like this

    app.findGrepPreferences = null;
    app.findGrepPreferences.findWhat = '\\d+';
    app.findGrepPreferences.position = Position.SUPERSCRIPT;
    numbers = myDoc.findGrep();
    for (i = numbers.length-1; i > -1; i--){
        numbers[i].contents = String(i+1);
        numbers[i].appliedCharacterStyle = myDoc.characterStyles.item("Sup");
    }
    

    Peter

  • Find all the numbers between 100.0 75.0 and apply "BOLD" format using GREP

    I am trying to find each number in multiple documents between 75.0% and 100.0% and change their "BOLD" format. Is there a GREP code for this or maybe a script code? Thank you!

    -J

    How is this:

    ((8\d{1}\.*\d*)| (9\d{1}\.*\d*)| (7 (5: 6: 7: 8: 9)). 100) %

    It worked on my sample.

    As changed search was actually my first soultion, but I tried to consoidate. He has worked on all the numbers in my first example, but failed on the number 88% on my second try.

  • grep for format of the numbers in square brackets]

    Hello, I have quotes in the text that appear in the ground [1] or [1-3] or [1, 3-5, 4: 7-10]. I want to use the blue color for the numbers in the model but all (, or-) else remains black. I use this grep ((?<=[\[]))([[:digit:]]+(,\s|-)) * [[: digit:]] + qui me donne une couleur bleue pour chaque chose.) How can I just blue numbers?

    Thank you.

    Why?

    It does not matter.

    It would be easy with Grep find & replace. But it is very difficult to do with Grep styles (without seeing the entire document). In this case, I can only give you the Grep styles:

    It is perhaps useful to you.

    Have fun

  • Once again on alignment to the right reference numbers with GREP

    For some jobs, I want the reference numbers in the notes align with the period that I have Options of IDCS4 reference Add (with an en space) as the separator between the number of note and the note text.  Not much so I set the paragraph style reference with a tab 'Match point' and then insert this tab at the beginning of the note.  I recently stumbled on this thread of 2009 where RodneyA that describes more in detail, and Eugene Tyson added a GREP search to automate the addition of tab: replace (~ F) with \t$1.

    I can't get this to work in IDCS4.  It worked in earlier versions?  Earlier this year, Jongware explained that GREP can not replace a reference marker, only to watch in front of or behind the marker to replace anything.  Unfortunately, in my notes nothing before the marker reference of GREP replace until I manually put my tab there.  Addition of these tabs to hundreds of notes by hand is not if bad (jumping with Ctrl + arrow keys) and ID's of the propensity to consume a way occasionally note, I need to check all the same.  But I was mistaken in thinking that if I want to automate the addition of tabs I you do this via JSX?

    Thank you

    David

    David, indicating when that you can't get something working, I must also tell you why

    But when I tried your "replace (~ F) with \t$1 ' for me it became real obvious right away: the code ~ F is not only 'the footnote reference number' but also the note itself in the text. So, it all works in the sense that you get a tab before the code of reference number, you get loads of additional tabs in your text as a bonus.

    There are several ways around this. The most obvious is to limit the operation replace all paragraphs in style with your reference style. If it is a single (mine is usually), it will work immediately. It is the first response of Eugene in the previous thread - possiblly you forgot to put this paragraph in the field Format style find.

    Another way is to add a tab only when the code of reference number is the beginning of a line:

    ^ ~ F

    replace it with

    \t$0

    (You're right noticing the trick 'postanalyse' cannot be reversed for an advanced search for just "opening of the line followed by the code of reference numbers". "It's the special flavor of an InDesign GREP Limitation).

    This may fail if you have a note at the beginning of a paragraph

    Still another way is to try to make use of the vertical position of the code reference number. If your references are superscript (which is fairly regularly) and the numbers in the notes themselves are not (that they may or may not be), you can search

    ~ F (+ position: normal)

    and replace with himself more a tab before, as shown above. (A variation would be to use a style of character for referrals by exposing and seek [none] style to pick up those inside notes characters.)

  • Grep which finds quotes and review for those on the right, but only after the numbers...

    Hello

    I'm trying to find all the quotes that follow the numbers and turn them into quotes.

    I'll try to put this in a GREP style eventually, but in the meantime, I examined it with find and change.

    Here's what I did... but it does not work.

    To find it - I have a positive look behind to find a digit, then pasted into the curly quote

    Fort of change to-I found the Unicode value for the right quote.

    But it did not work ;-(

    any thoughts there!

    Babs

    Picture 1.png

    «is any sort of double quotation marks (straight, curly, opening and closing).»

    To force some sort of quote, use one of these:

    ~ {double opening curly

    ~} double closing curly

    ' ~ ' Straight

    "(Remplacez seulement) uses the typographer use quote setting (that is, if on, change to appropriate completed open or close, otherwise use the right)"

  • How to paste some data from numbers to some placeholders in the Pages using AppleScript and Automator?

    Hello AppleScript and Automator Pros!

    Unique ID Elements Quantity Unit of measure Sum, $ Color Dark?
    1 Pencil 1 Agenda 90.50 P Yes
    2 Pen 150 Agenda 300.23 THERE NO.
    3 Pillow 2 Agenda 400.01 B NO.
    4 Toy 114 Agenda 500.30 R Yes
    5 Repair service N/A N/A 1.00 N/A NO.
    6 Phone 98 Agenda 1986.10 W NO.

    P = purple

    Y = yellow

    B = black

    R = red

    W = white

    It was an example of Document numbers


    Now the example of Document Pages

    [PH for Unique ID] - Ben got: [PH for element], [PH for quantity] [PH for unit of measure], [dark or not PH] [PH for color] for [PH for sum before the comma] $ [PH cents] c.

    When Ben had [PH for quantity] [dark or not PH] [PH for Color] [PH for item tiny first character and changeable if necessary end], he became happy

    Example 1: Allows you to take data from line with Unique ID 1 and that's what it takes to go:

    1 - Ben got: pencil, 1 point, violet dark 50 ° c for $ 90.

    When Ben had 1 Purple Pencil dark, he became happy

    Example 2: Now data row with Unique ID 3 and it is what to get:

    3 - Ben got: Pillow, 2 pieces, blue for $ 400 01b

    When Ben had 2 blue pillows he became happy

    Example 3: Now the data used to row with Unique ID 5 and this is what it takes to get:

    5 - Ben got: repair service, 1 service, for 1$ 00 c complete

    When Ben had 1 repair service complete, he became happy

    Here, I have to change given n/d of the table in numbers and replace quantity with 1 PH, PH for unit of measure with service (no point as in the previous examples) and the PH for color with plenty of example.

  • How to get the numbers to remember a list of answers column on nine or more tables using the same format

    I'm new to numbers but were mainly use it to organize only a simple way to display the cases that arise in a criminal background check. So for a table, I can type driving while license revoked (DWLR) as the load and from there on the charge will fill itself or offer similar responses after typing a single key.  A well appreciated time saver but problems I can sort and summarize the criminal history for 10 people or more at a time and need to do it urgently often.   However when I opened a new table I have to cross and type a new the precise wording of a charge, its disposal (Guilty, voluntary dismissal etc.)  and just know that there is an easy way for the numbers to know in a new table that, if finished it is a list annoyingly long term broken criminal code list and do not have to do that in each new table so that it can take.  I know I'm missing something very basic, but any help would save hours for me and the other poor interns who spend twice as long just to undestand the case and troubleshoot.  Thanks for all the ideas!

    David

    Hi D,

    The AutoComplete feature provides suggestions picked on data entered in the cells above the one you are working in. You can automate the process by preparing a "full menu" table containing ALL the possible inputs for each column in the rows below the header lines.

    The checkbox in cell A1 is a switch, is used to insert the word HIDE in the cell that contains the list of AutoComplete terms. Cells in this area are filled with bright red to draw attention to them when indicated.

    A rule to reorganize (shown and applied below) hiding these lines when the box is checked.

    Hide the lines does not affect the operation of auto-complete, as shown in the table below:

    When the form is competed, action depends on how the result will be recorded and filed.

    If there is no need to edit/modify the file, it can be converted to a PDF using the print dialog. This produces a copy of the displayed part of the document only.

    If the document will require more editing, you can remove the lines containing AutoComplete suggestions. Clear the check box, select all the red lines filled, click the triangle in the row reference tabs and choose Remove.

    Formula in A2 - A10: = IF(A$1,"HIDE","")

    Kind regards

    Barry

  • How can I make the matrix using numbers

    Yes, for now I'll try to find out how to use the numbers to do the multiplication of matrices

    Something like that?

    In cell A1, filled to the right and downwards:

    = SUMPRODUCT (Matrix 1::1:1, TRANSPOSE (matrix 2::A)))

    SG

  • ThinkPad R60 cannot install Windows XP After erasing the HARD drive using the lenovo diagnostic utility

    WinXP pro Setup cannot find that any installed HARD disk so cannot install windows. Unfortunately after many attempts to use rescue and recovery to restore the factory settings and for some reason constantly default... After leaving another utility popped up giving me the opportunity to erase the HARD drive and so I did... After fact as well and all I had was a blank screen, no windows more or no matter what utility to reinstall windows, then I used my winxp pro installation CD, but the program installation would continue not after a certain point by saying that the installation did not find any HARD disk installed. followed by "ensure that any disk HARD r turned on and correctly connected, and that no matter what material associated drive configured correctly, this may involve running a manufacturer provided diagnostic or Setup program. Clearly it took me by surprise. What was supposed to be a cut to white erase and reinstall now me baffled and angry. Formats the HDD of the solution? If so why didn't not the usefulness of lenovo do... If not, what is the problem? Someone help pls

    Welcome to the forum!

    Go into the BIOS (F1 at startup), set the "compatible" SATA mode (NO AHCI), then press F10 to save and exit, and you should be all set.

    Good luck.

  • Numbers in the textfield using the Boolean and structure of the case?

    Hello!

    I am very new to these forums and LabVIEW in general. I am currently trying to implement a calculator-ish, but without the operations (+ - * /).

    I have 10 Boolean buttons named 0-9, and with them I want to basically write a sequence of numbers in a textfield. I managed to solve the problem using a structure of the event, but now I would get the same result using a case instead of this structure. The problem is that I can't identify which button was pressed, so I can't make the program go to the proper case (0 to 9). Is there a simple solution to what you guys could help me with? Perhaps a property node that is generic for each button? I do not know

    in any case, I enclose you a simplified version of what I am seeking to achieve, withouh code I do not know how to write of course.

    Thanks for your help in advance!

    / Sebastian

    Here's a way to do it: combine Boolean values in a table, which become an 8-bit number and which thread to a structure to deal with a Boolean radix

Maybe you are looking for