GREP search only made a line then goes back to early history

I have text pages separate tab that needs to have paragraph returns inserted after a price to prepare the document for conversion to Excel. I put the following expression in InDesign CS4 find/replace.  Search: (\$(\d{2,3}) [..] (\d{2})) \t change: $1. I want InDesign to find all occurrences of a dollar sign, followed by either a 2 or 3 digits, followed by a comma, followed by a number with 2 digits, followed by a tab. I just want to replace the tab with a paragraph return. He finds the number, but when I click on find next, he jumps to the top of the document and said that the search is over. I tried to turn and the parameters of single line and multi, but that doesn't seem to work. Suggestions anyone?

Hello

There is a problem with------$. Change of $ £, for example, and your regular expression will be OK.

Try to find what: (\$\d+\.\d+)\t([^$]) change by: $1$ 2

Tags: InDesign

Similar Questions

  • Grep search only on the current page, return array "search everything".

    Hello

    Is there a way to grep search only the current page, or any page chosen in my paper (myDocument.pages [i])?

    I can only manage to search for in the document.

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.findWhat = "Chapter (\d+)";

    myDocument.findGrep)

    Also, is there a way to return the content to find? In this case, I want the $1 this research...

    var a = myDocument.findGrep (). ?

    Thank you

    Christopher

    the error is because you have not initialized the tabular myRet variable.

    Another problem is the use of textframes.everyItem (), because that returns a different object.

    and another is what happens if a textframe is empty you will get an error on the meaning of "object has no text for find/replace.

    Here is the fixed code:

    var myRet=[]
    var myDocument=app.activeDocument;
    var tf = myDocument.pages[0].textFrames.everyItem().getElements(),
    tf1 = myDocument.pages[0].textFrames.count();
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "Chapter";
    for (var i = 0; i < tf1; i++){
     if (tf[i].characters.length){
    myRet=myRet.concat(tf[i].findGrep());
    }
    }
    alert(myRet)
    
  • go to a web page, firefox will pass it to a "file not found" but arrow to the left shows the page then goes back to 'file not found' again.

    for example. Google 'bc spca', choose www.spca.bc.ca and go. Firefox gives me this...

    File not found
    Sorry, the page you requested was not found. Please try again.

    Original URI: /assets/tab_advocate_mo.jpg

    But if I hit the arrow to the left, it shows me the page I searched for a fraction of a second, then goes back to the file not found again. This does not happen with Chrome or Internet Explorer. They go to the appropriate page.

    I am running windows 8.1 and uninstalled and reinstalled Firefox. NO GO. Help, please.

    Generally if an image on a page can not be found, Firefox does not redirect the entire page with an error message. the area of the image is just left in white. If this is not normal.

    On the error page, what do you see in the address bar, if anything?

    To check if one of your extensions could be the culprit, could test some pages from Firefox Safe Mode problem? It is a standard diagnostic tool to disable some advanced features of Firefox and extensions. More info: questions to troubleshoot Firefox in Safe Mode.

    You can restart Firefox in Mode safe mode using either:

    • button "3-bar" menu > "?" button > restart with disabled modules
    • Help menu > restart with disabled modules

    Not all add-ons are disabled: Flash and other plugins still works

    After stops in Firefox, a small dialog box should appear. Click on 'Start mode safe' (not reset).

    Any difference?

  • Automatic updates you ask again to update me. When I do he does then goes back to asking me to update again.

    Automatic updates you ask again to update me.  When I do he does then goes back to asking me to update again.

    How to ask a question:
    http://support.Microsoft.com/kb/555375

    Suggestion:

    How to reset the Windows Update settings?
    http://support.Microsoft.com/kb/971058

    and/or

    How to troubleshoot Windows Update, Microsoft Update and Windows Server Update Services installation issues
    http://support.Microsoft.com/kb/906602

  • HP 4480 printer prints only first three lines, then stops

    Dear community,

    problems with my printer recently.

    Page begins printing, 3-5-7 lines, then stops, the printer says busy and the work never ends.

    Initially, there was a mistake with compatible OHCI 1394 host controller. I have upated the driver to that with the extension of the LEGACY software. He printed for a day and returned the nastiest non-printing again.

    Sometimes, the printer selects the fax mode and when I go into the properties to correct for PRINTER, it still doesn't work in the unual 3-5 lines of the page.

    I hate to throw my machine to landfill, be eco-friendly.

    Can someone tell me WHAT IS the reason for my problem?

    Need help URGENT.

    Laura

    Hi @multitasking,

    Welcome to the HP Forums!

    I noticed that your HP 4480 printer prints only the first three lines, then stops. I'm happy to help you with this printing problem!

    To get help, I'll need to know:

    1. The number of product/model of your printer. Follow the instructions in this link. Find your model number of the HP product.
    2. If you use Windows or operating system Mac and the version number. To find the exact version, visit this link. Whatsmyos.
    3. If the printer is connected, wireless, or USB.
    4. If the printer is able to make copies.
    5. If the power cable is connected to a surge protector, or directly to a wall outlet. Questions when it is connected to an uninterruptible power supply/Strip/surge protector power. This is true for printers and ink jet.

    Please see this post, want good answers? Ask good Questions, by @Bob_Headrick, then you can get the most out of these forums.

    If you are using Windows, please try the HP print and Scan Doctorand let me know what happens!

    Thanks for posting, and I hope to hear from you soon!

  • When I try to change the search words in the browser, it goes back to the expression of the typed original and does not accept the change

    "When I try to change the words in firefox search does not accept... g e. I type in the search for"Joe Bloggs"and then try to change her search to search for"Joe Bloggs"Football it trying to connect briefly and then displays the results of the previous search" Joe Bloggs "and added words 'Football' no longer appear in the search bar.

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions or if hardware acceleration is the cause of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Only show 3 lines, then...

    Hello

    I am trying to find a way in which I can view a list of people involved in a project.

    The problem is I want to be able to show only the names of the 3 (if the list is longer than 3 lines) and therefore display: «Show complete list»

    For example:

    Currently:

    Must be:

    Members:

    Bob - Admin

    Charlie - Admin

    Sam - moderator

    Alex - Manager

    John - Advisor

    Max - moderator

    Chad - Manager

    Simon - Advisor

    Members:

    Bob - Admin

    Charlie - Admin

    Sam - moderator

    ...

    See the full list

    (Where each line break is a < br > in the field of database)

    Display of the 'complete list see the institution' isn't a problem, it is the code saying that it ceases to display names more after 3 lines.

    Any help would be much appreciated!

    Thank you

    Because all names are in a single database field separated by
    tags, you can convert the names into an array:

    $members = explode('
    ', $row['members']); $first_three = array_splice($members, 0, 3);

    $first_three contains the names of the first three. $members contains the remaining names.

  • Email notification sound goes back to default

    Three times now, I put my email notification sound for Facebook pop. It works for awhile but then goes back to "Droid". Do not know why.

    Anyone? 2.2.1 running and have noticed that since the recent update.

    Daringo wrote:Three times now I have set my email notification sound to Facebook Pop. It works for awhile but then goes back to "Droid". Not sure why.Anybody? Running 2.2.1 and have only noticed this since the recent update.
    

    I don't know why this is happening, but I have a possible workaround.  I do not use facebook on my phone, so it's just all the thoughts in my head.

    First of all, where is the sound of facebook that you use?  I think this is the facebook app doesn't like to share her sounds with other applications or the phone.  What happens if you were to copy the sound where it is now and put it in your notifications folder and set it as your notification from there.  I don't know if it will work, but it's something to try anyway.  I hope this helps.

  • I get the reminder that the creative cloud is missing or damaged and to download a new CC, when I try to download he did not finish, it goes back to the statement that I need to download any new creative cloud.  Anyone who has this problem

    I get the reminder that the creative cloud is missing or damaged, and to download a new CC, when I try to download it will try then goes back to the original message that the CC is damaged or missing.  Anyone else having this problem and what to do?

    If they are cc, Yes.

    Uninstall anything cc, clean by use the CC cleaning tool to resolve installation problems. CC, CS3 - CS6 and then reinstall your cc, Download Adobe Creative Cloud apps desktop app | CC free trial Adobe

    Use the cc desktop app to install your cc of adobe programs.

  • GREP: Search and replace

    Does anyone know if its possible to take a list (shown on the lower part of the image) and run a GREP search and replace to create the list of tabs (shown on the picture)?

    I know that the majority of it can be made with the regular search and replace: separate the first and last name; MD and MD #; Postal code and telephone number.

    What I was not able to understand is how to add a tab forward and backward the state abbreviations 2-digit, the Middle Initial, phone number and more important even if there is a way to add tabs in when there aren't the same amount of lines, such as the field of specialty.

    I know that I can use the GREP search and replace to add a tab before each paragraph back, then remove the tab where there are 2 paragraph after each game returns, then substituting a tab and a paragraph back to just a tab, together running all the rows in each set.

    Any help would be greatly appreciated, and if there is anywhere I can learn more about GREP, I would love to learn it.

    Thank you

    Peter

    Doctors List Styles.png

    Peter, try this...

    Find:------.<>

    Replace: \t$0

  • GREP search for all characters

    (Indesign CS6, Windows 7)

    For a book that I'm layout, the author marked text that should be indented like this:

    [indent]

    < paragraph >

    < paragraph >

    ...

    [indent]

    (Of course, in an ideal world, the Publisher would have charged the author simply use a word for this function.)

    I made a for the text indented paragraph style. I wanted to replace it in one shot, GREP search:

    (\[indent\]) ([.| \s|\r]+) (\[/indent\]) the middle part meaning one or more (+) of any character (.) or space or paragraph return. Replace it with:

    $2 and the paragraph style (getting rid of the markers at the same time).

    Nothing has been found. I changed it to (\[indent\])([\w|\s|\r]+) (without the end marker [indent], to see what would happen) and now he found something - but stop at the first mark of punctuation (only reaching no not the end marker). So I tried to fill in punctuation: (\[indent\)] ([\w|\.|-, |: | \s|\r]+]) and each time more was found (by the way,------. here means a complete stop). If it works more or less.

    The problem is, is a technical manual and most equations etc are in the text that should be indented, so there are a lot of characters who are neither letter or number. And of course you can not call it a clean solution.

    It's the kind of string search and replace I would also use on many other projects. Does anyone know a better solution? Now, 'any character' doesn't seem to work, there at - it a code for "any character being not not a letter or number? Thanks in advance.

    Try (? s)(\[indent\]\r?) (.+?) (\[/indent\]\r?)

    The (? s) runs on single line mode so it can be found through several paragraphs and the (. +?) is the shortes match between the tags. I've included returns after the tags, if there has, based on your example that the tags are separate paragraphs. If they are at the end of the paragraph that you want to keep, remove the \r? to avoid losing the paragraph breaks.

  • ListField: RENDERER updates only the top line

    Hey all,.

    Calling for first time, long time listener. I cut my teeth on BB dev and have hit a snag. I created a ListField which takes an array of custom RowObjects that includes not only the table that makes up the line, but both the properties of style (background color, text color).

    My 2 questions are the only the first line is its background color and the rest are by default. None get the color of the text. It seems that the rendering engine is only called once, bouncing absolutely me.

    The second problem is that I can't scroll horizontally to view additional columns that are off-screen.

    Main components TableField code:

    package com.keslabs.kui;
    
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    
    public class TableField extends ListField
    {
        private TableRowManager[] _rows;
        private int[] _columnWidths;
        private int[] _horizontalPaddings;
    
        public TableField(TableRowObject[] contents, int[] columnWidths, int[] horizontalPaddings)
        {
            int numRows = contents.length;
    
            _rows = new TableRowManager[numRows];
            for (int curRow = 0;  curRow < numRows;  curRow++) {
                _rows[curRow] = new TableRowManager(contents[curRow]);
            }
    
            // Store the layout data.
            _columnWidths = columnWidths;
            _horizontalPaddings = horizontalPaddings;
    
            // Configure this ListField to operate with TableListField semantics.
            setSize(numRows);
            setCallback(RENDERER);
        }
    
        // Calculates the horizontal position at which the indicated
        // column should begin, based on the column widths and paddings.
        private int getColumnStart(int col)
        {
            int columnStart = 0;
            for (int i = 0;  i < col;  i++) {
                columnStart += _columnWidths[i];
                columnStart += _horizontalPaddings[i];
            }
            return columnStart;
        }
    
        public int moveFocus(int amount, int status, int time)
        {
            invalidate(getSelectedIndex());
            return super.moveFocus(amount, status, time);
        }
    
        // Invoked when this field receives the focus.
        public void onFocus(int direction)
        {
            super.onFocus(direction);
            invalidate();
        }
    
        // Invoked when a field loses the focus.
        public void onUnfocus()
        {
            super.onUnfocus();
            invalidate();
        }    
    
        // Manager that lays out the fields of a table row horizontally,
        // within the columns of its enclosing TableListField.
        private class TableRowManager extends Manager
        {
            private TableRowObject _row;
    
            // styles
            public int bgcolor = Color.BEIGE;
            public int fgcolor = Color.BLUE;
    
            // Constructor.  The elements of rowContents are added to this manager
            // so that when it is layed out, these fields become cells within a row.
    
            public TableRowManager(TableRowObject rowContents)
            {
                super(0);
    
                if (rowContents.bgcolor != -1) {
                    bgcolor = rowContents.bgcolor;
                }
                if (rowContents.fgcolor != -1) {
                    fgcolor = rowContents.fgcolor;
                }
                _row = rowContents;
    
                for (int col = 0;  col < rowContents.data.length;  col++) {
                    add(rowContents.data[col]);
                }
            }
    
            // Causes the fields within this row manager to be layed out then
            // painted.
            public void drawRow(ListField listField, int index, Graphics g, int x, int y, int width, int height)
            {
                // Arrange the cell fields within this row manager.
                layout(width, height);
    
                // Place this row manager within its enclosing list.
                setPosition(x, y);
    
                // Apply a translating/clipping transformation to the graphics
                // context so that this row paints in the right area.
                g.pushRegion(getExtent());
    
                // Paint this manager's controlled fields.
                subpaint(g);
    
                g.setColor(bgcolor);
                g.fillRect(0, y, width, height);
                g.setColor(fgcolor);
                //g.drawText("i-"+index, 0, y);
    
                listField.invalidate(index);
    
                // Restore the graphics context.
                g.popContext();
            }
    
            protected void sublayout(int width, int height)
            {
                for (int col = 0; col < getFieldCount(); col++) {
                    Field curCellField = getField(col);
                    layoutChild(curCellField, _columnWidths[col], getPreferredHeight());
                    setPositionChild(curCellField, getColumnStart(col), 0);
                }
    
                setExtent(getPreferredWidth(), getPreferredHeight());
            }
    
            public int getPreferredWidth()
            {
                return RENDERER.getPreferredWidth(TableField.this);
            }
    
            public int getPreferredHeight()
            {
                return getRowHeight();
            }
        }
    
        private static final ListFieldCallback RENDERER = new ListFieldCallback()
        {
            public void drawListRow(ListField listField, Graphics graphics, int index, int y, int width)
            {
                TableField tableField = (TableField) listField;
                TableRowManager rowManager = tableField._rows[index];
                rowManager.drawRow(listField, index, graphics, 0, y, width, tableField.getRowHeight());
            }
    
            public int getPreferredWidth(ListField listField)
            {
                TableField tableField = (TableField) listField;
                int numColumns = tableField._columnWidths.length;
                return tableField.getColumnStart(numColumns);
            }
    
            public Object get(ListField listField, int index)
            {
                TableField tableField = (TableField) listField;
                return tableField._rows[index];
            }
    
            // prefix searching is not supported
            public int indexOfList(ListField listField, String prefix, int start)
            {
                return -1;
            }
        };
    }
    

    Class TableRowObject (which works fine, but I posted for ease of understanding):

    package com.keslabs.kui;
    
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.container.*;
    import net.rim.device.api.system.*;
    
    public class TableRowObject {
    
        public Field[] data;
        public int bgcolor = -1;
        public int fgcolor = -1;
    
        public TableRowObject(Field[] rowContent) {
            data = rowContent;
        }
    }
    

    Any help that could be provided would be great that I was stuck with this for 3 days banging my head against a wall.

    Yes, but it must not necessarily be 'this '. It can be any other object that you did in your implementation.

  • Numbering of the GREP search result

    Hi all

    I am trying to apply some paragraph styles to various items in my document, but rather than static reference to the paragraphs in question (whose position can be subject to change in the future), I try to do a GREP search result-based. The chapters follow the same structure, with a subtitle of chapter ("Chapter 1, Chapter 2, and so on"), followed by a paragraph with the title of the chapter, followed by the first paragraph of the body.

    Now, it is easy for me to find the chapter number using a GREP search, and I would like to know if it is possible for me to read the number of paragraph of this search result. In this way, I can start the paragraph numbers of the remaining items on their position relative to the subheading and then apply the styles to paragraph appropriate for them.

    All the best and thanks in advance,

    Julian

    p.s.: as a reference, this is the result of the search:

    
    
    
    
    // Find chapter subheading and apply
    
    
    
    app.findGrepPreferences = app.changeGrepPreferences = null;
    
    
    
    app.findGrepPreferences.findWhat = "(?i)Hoofdstuk \w*\r";
    
    
    
    var myStartLine = myDocument.findGrep(); // Save search result for future reference as a first line
    
    
    
    app.changeGrepPreferences.appliedParagraphStyle = myPGS_CS ;
    
    
    
    myDocument.changeGrep();
    
    
    
    

    Just another idea: If you can find your first paragraph apply the paragraph style, and then loop through all paragraphs in the document and compare the name of the applied style. If you found one, the next paragraph is the current a + 1, the second is the current a + 2.

    var curDoc = app.activeDocument;
    
    app.findGrepPreferences = app.changeGrepPreferences = null;
    app.findGrepPreferences.findWhat = "Head \\d\\r";
    app.changeGrepPreferences.appliedParagraphStyle = "h1";
    
    var startLine = curDoc.findGrep();
    curDoc.changeGrep();
    
    var allParas = curDoc.stories.everyItem().paragraphs.everyItem().getElements();
    
    for ( var p = 0; p < allParas.length; p++ ) {
        var pStyleName = allParas[p].appliedParagraphStyle.name;
        if ( pStyleName == "h1" ) {
            allParas[p+1].appliedParagraphStyle = "p1";
            allParas[p+2].appliedParagraphStyle = "p2";
        }
    }
    

  • Number of paragraph in grep search

    Hi all

    ID CS5 ME

    I have a large document where I have a lot of simple paragraphs that contain only as follows:

    13:5

    or

    13:6

    or

    17:7-8

    Here are all the numbers of the verses of the bible, first there's a paragraph say 13:5 and right under a paragraph with the verse and afterwords again a number of verse, then verse, now how can I search to search only the number of verse grep?

    Thanks in advance

    Sruly

    What is a regular hyphen or a dash n? What I posted works for hyphens. Replace the hyphen with what you use...

    Substances

  • GREP search / replacement issue

    Hi all

    I'm new to GREP searches, but I had a lot of success in my current document (CS3). I'm running a problem now, however. I am trying to replace a manual coding with a paragraph style sheet and the paragraph (in this case italics) already applied character style leaves change when they are applied. For example in this sentence:

    "For what purpose, then, of conscience at all when it's in the main superfluous?

    changes made to the

    "For what purpose, then all conscience at all when he's in the main superfluowe?


    When I use my GREP search and replace. For the rest of this paragraph, the paragraph style is applied correctly, it is really strange to local formatting to be switching where it is applied.

    I searched the forums and haven't found anything on this issue, any ideas would be greatly appreciated.

    Thank you!

    I'm sorry to confirm your woes...

    It is a "bug" of sorts - you change the length of the text with your GREP, and ID forgotten somehow adjust formatting when text is deleted. I tried a few varieties because it usually works okay-ish, CS3, and CS4. With your sample, I couldn't remove even a single character without "moving" the formatting as well.

Maybe you are looking for

  • IPhone-Android text problem

    I had a problem when a group of friends sends SMS and I do not get them from one of the individuals in the group. This group consists of 3 iPhones and Android 1. I know issues when people spend to have an iPhone and then go to an Android but forget t

  • [Keyboard] How to disable the keyboard automatically to Kanji to Japanese

    Basic information: Computing: MacBook Air OS version: 10.11 Keyboard: Japanese (hiragana) Problem: Since the upgrade to El Capitan, my Japanese keyboard behaves differently. Original: While typing, letters would go out in Hiragana, then after hitting

  • Bluetooth music stuttering - IOS 9.3.1 Iphone 6

    This problem is with my Toyota 4 2016 runner via bluetooth only. Note that I can play with success of music via bluetooth with other devices, wireless speaker, etc. This occurs intermittently when you play pandora, spotify or other radio applications

  • The Java plugin does not appear in the Plugins tab

    The machine is a SLES11 running on x86_64 architecture. Firefox is 3.0.6 (from the installation of SLES11 DVD) version.I installed the jre-6u25 under/usr/java.I restarted Firefox after installation.No Java plugin is available under Tools/Add-ons/Plug

  • Satellite L655 - 1EW don't start - no battery charge

    Hello I need help.My laptop doesn't work anymore.When I press the power button, the orange light blinks slowly.The main power turn on no light is on (power led), do not charge the battery! I have check the external power supply, it's ok (19V is here)