Find/replace help-

I need to remove everything after a specific character

I got a list for an example like this:

In a table...

Test #3434

Test #3434

Test #3434

Test #3434

Test #3434

Test #3434

I need to remove #3434

Find: #.

Change:?

Thank you!

Styles grep can't add text or remove the text - it basically applies a character style to the text.

You can do a search for replacement for

GREP

(?<>

Implement

leave blank

If you want to "send" with a GREP style. You could make a character style can choose the color of the character to be None

Then in the style use GREP (?.)<>

And choose the character style.

But this leaves the text where it is, just apply has no color so that you can't see.

Tags: InDesign

Similar Questions

  • Find/replace help with generic numbers...

    Hello... I am looking for help with wildcards.

    I have a specific task to complete... I have to add dash & space in a space in a string of letters and characters...

    here

    221 Kbps - 00:28:34space dash space here47 MB - 44.1 kHz

    198 kbps - 01:27:43 41 MB - 44.1 kHz

    215 Kbps - 00:34:52 156 MB - 44.1 kHz

    225-14 Kbps: 32:00 54 Mb - 48 kHz

    If my finished text will look like this

    221 Kbps - 00:28:34 47Mb - 44.1 kHz

    198 kbps - 01:27:43 - 41 Mb - 44.1 kHz

    215 Kbps - 00:34:52 -156 MB - 44.1 kHz

    225-14 Kbps: 32:00 - 54 Mb - 48 kHz

    There are many variables the text - but I thought that maybe I could create a generic figure find/replace, based on the Mb of type bit, replacing the single space space hyphen space

    BUT

    I need to keep the numbers before the MB

    so my question - is it possible to KEEP the NUMBERS of GENERIC character?

    Thank you very much!

    If text is like that throughout, you could do a search for

    To find

    (\:\d\d)\s+(\d+Mb)

    Implement

    $1-$2

    Try it on a few see if it works.

  • Generic, RegEx Find &amp; Replace Help Needed

    I'm in a time CAP and need some advice. I want to understand RegEx, but right now need a quick fix.

    I have a HUGE body of code that has a type of paragraph repeating everywhere, different contents in each particular case. I need to treat these paragraphs stand out by adding a rule above and below the surrounding text. The above rule is obvious, because of the class, this is the unique identifier for the paragraph, so I have to use for the weaker rule as well. I insert a string after the closing < /p > tag of each paragraph. I need a generic configuration that will escape the contents variable of all these paragraphs, but leave them intact afterwards.

    Let's say that this represents the structure of paragraph:

    < class p = "para_PN" > PN: [content Variable] < /p >

    That's what I have to do to move on hundreds of cases:

    < class p = "para_PN" > PN: [content Variable] < /p > < p > [element added to all] < /p >

    Is the closest, I came:

    To find:

    < class p = "para_PN" > ([^ <] *) < /p >

    Replace with:

    < class p = "para_PN" >$ 1 < /p > < p > [element added to all] < /p >

    But it stores the data for the first wildcard and stops later. Apparently I need a $ 2, $ 3, etc. for each instance and it is not convenient... It is already too.

    Any ideas or solutions would be appreciated.

    Thank you!

    Cayce

    I'm not sure that I fully understand what you're trying to do. If it is to make these paragraphs are distinguished by adding a rule upper and lower, the simplest way to do so is with CSS:

    {.para_PN}

    border-top: 3px solid #000;

    border-bottom: 3px solid #000;

    }

    However, if you want to add a text in a paragraph, it is the regular expression that you need:

    (

    [\w\W]+?

    )

    In replace with field:

    $1

    It is a new text.

    When you click on replace all, Dreamweaver goes through paragraphs correspondents one at a time. $1 replaces the original paragraph, and then the new text is added.

  • Need help with this find/replace Script.

    Hi I got this script from Loic.Aigon.  And I got it works for find/replace simple changes however I Cannon operate for several changes.

     function cb5CallBack(target) {
            var findProps, changeProps;
            
                findProps = {findWhat:"Distributed by ",}   
                  changeProps = { changeTo:"Distributed by. ",}
                findProps = {findWhat:"Distribué par ",}   
                  changeProps = { changeTo:"Distribué par. ",}
                findProps = {findWhat:"Distribuido por ",}    
                  changeProps = { changeTo:"Distribuido por. ",},
              
            RTXT(target, findProps, changeProps);   
            } 
    

    function RTXT(target, findProps, changeProps)
    {
    app.findChangeTextOptions.caseSensitive = true;
    app.findTextPreferences = app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.properties = findProps;
    app.changeTextPreferences.properties = changeProps;
    app.changeTextPreferences.properties = changeProps;
    target.changeText();
    }
    

    You must call the function RTXT repeatedly as well:

        var findProps, changeProps;

        findProps   = { findWhat:"Distributed by "};

        changeProps = { changeTo:"Distributed by. "};

        RTXT(target, findProps, changeProps);

        findProps   = { findWhat:"Distribué par "};

        changeProps = { changeTo:"Distribué par. "};

        RTXT(target, findProps, changeProps);

        findProps   = { findWhat:"Distribuido por "};

        changeProps = { changeTo:"Distribuido por. "};

        RTXT(target, findProps, changeProps);

  • Help with wildcards and find/replace

    I have indesign CS5 and I'm working on a document that contains a number of mathematical examples throughout these 9-1 = 8. The corrector said must change to be a space between each symbol figure and math at 9-1 = 8. How can I do this? When I go to find/replace, I have the option of wildcards in find, but not to replace it.

    The dashboard in these equations must also be changed to quadratins. How can I know indesign is any time sees such an equation, the dashboard must be changed? I don't want to just change all the dashes as I much dashes that need to stay.

    Try it on greep

    Search: (\d+)\-(\d+)\=(\d+)

    Change: $1 / $2 = $3

  • Help with letters in find/replace

    Hiyis. I am trying to replace all instances of 'US' 'US', but when I type in find/replace, I get stuff like 'chat' highlighted. No way to specify simply WE capitalized on its own? Or do I have to go through and review each proposed amendment?

    Thanks tons!

    Click on the icons for the case-sensitive and whole word in the dialog box:

  • Find/replace on the long list of addresses

    I hope someone can help here.  I have format it more 11 000 address for publication in the following ways:

    < < current format > >

    1803156, I MEAN FIRST OF ALL, ADDRESS 1, STE 1

    1803157, I MEAN FIRST OF ALL, ADDRESS 1, STE 1

    etc...

    < < need to replace the first comma and space with a tab > >

    1803156 LAST, FIRST, ADDRESS 1, STE 1

    1803157 LAST, FIRST, ADDRESS 1, STE 1

    etc...

    Can anyone think of an easy way to do this with find/replace or another method?

    Search: (?-s)^.+?\K,\h)

    Replace by: \t

  • GREP find/replace + paragraph Styles

    Hello

    I'm editing a long document and have benefited from the assistance of the community already, but being new GREP Style, find/replace, I need to ask for additional help.

    Below a screenshot of the script (original). Two blocks of text you see anticipated by the icons have have styles of different paragraphs. Icons are placed like custom glyphs.

    Now, the last line with C2, 9, 14,... is the target of this post. They are buses of London and I created a paragraph with another icon. The copy that I work with unfortunately is as you see. Buses will follow «;»

    Resulting to place a \r after the semicolon and assign the new paragraph style. The item to work with is (probably) the last "," before the registration of the bus. All entries have it in the same way, where a search/replace global grep should work fine.

    My attempts:

    I used of a previous debate (? < =------;)) [^ ;] + $ to match everything from the end until the last semicolon, but then I found the problem preserving the matched characters and placing \r (using the (? < =-;). start at the beginning and stops at each point comma + space)

    So question: how to stop at the first semicolon at the end and replace the space with \r to create a new paragraph?

    Then, it is two question :-)

    From my previous attempts, I noticed that when you replace the semicolon + space with \r, and change the style of paragraph at a time (from Rail to Bus) caused the Rail paragraph style change (logic) to the style of Bus. So I tried to say the paragraph style of the track "Following paragraph Style is style of Bus" (and not to change the paragraph style in find/replace), but in a way that no longer works.

    Second question is: given to split the find/replace in two steps, how then transform / apply to newly created paragraph the correct style of Bus?

    Thank you in advance for your valuable assistance. So far, the community has been great!

    Antonio

    Original

    Screen Shot 2016-07-12 at 22.32.23.png

    Result for

    Screen Shot 2016-07-12 at 22.54.51.png

    Hi Antonio,.

    If I understand correctly, in 2 regex [1 click play with Multi/find-replace our friend Martinho da Gloria]:

  • Find/replace preference - include locked, locked layer the objects (Find only)

    Hi all

    I was wondering if anyone can help, I'm trying to make sure that the option "Include Locked layers and objects locked (research only)" on the box search/replace is active when the script below is executed because when it is disabled the text find/replace does not check locked layers and objects.

    In InDesign this icon located in the Find/Replace dialog box, a little less the "search:" drop down menu, icon of the left hand.

    Replace the text "Page Type"

    app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING;

    app.findTextPreferences.findWhat = "Page Type";

    {found = app.activeDocument.findText () [i] = "STET".silence ;}

    Any help would be great thanks, Brendan

    app.findTextPreferences = app.changeTextPreferences = NothingEnum.NOTHING;

    app.findChangeTextOptions.includeLockedLayersForFind = true;

    app.findTextPreferences.findWhat = "Page Type";

    {found = app.activeDocument.findText () [i] = "STET".silence ;}

  • Cannot open find/replace... Tab palette blocks InDesign

    InDesign questions CC2015: when I try and open find/replace in the menu or the key order, nothing happens. When I try and open the palette of the tabs in the menu or command, it blocks of InDesign.

    Any help would be appreciated.

    Is this a new behavior? Try 101 troubleshooting: replace, or 'trash' your InDesign preferences .

  • conditional text find/replace problem

    Hello!

    For a few hours, I'm trying to solve this case: I want to apply conditions (conditional text) to all paragraphs according to the name of the applied style. So, for example, text with paragraph called "BODY" style should have "BODY" of the conditional text etc. I figured out mechanism, but I can't solve the problem with passing to find/replace.

    Here is my code:

    (function() {
        if (app.documents.length > 0) {
            processDocument(app.documents[0]);
        }
        function processDocument(aDoc) {
            var paraStyles = aDoc.allParagraphStyles.sort();
            for (var j = 0; paraStyles.length > j; j++) {
                var currentStyle = paraStyles[j].name;
                if(aDoc.conditions.item (currentStyle) == null){
                    var varConditions = aDoc.conditions.add({name: currentStyle});
                }
                doFindChange(currentStyle);
            }
        }
    }())
    function doFindChange(currentStyle) {
        app.findGrepPreferences = app.changeGrepPreferences = NothingEnum.nothing;
        
        app.findGrepPreferences.appliedParagraphStyle = currentStyle;
        app.changeGrepPreferences.appliedConditions = currentStyle;
        
        app.activeDocument.changeGrep();
    }
    

    I know what's wrong, but I have no idea how to change.

    Could someone help me?

    Thanks in advance!

    You have some problems in the code:

    1 move the actual paragraph style (and not just its name) to findGrepPreferences (your variable, currentStyle is a string, although this can work, it is better [especially for paragraph in the groups styles] to adopt the paragraph style real itself).

    2. Ditto for the appliedCondition: give changeGrepPreferences the condition itself, not just its name.

    3. it seems that changeGrepPreferences.appliedConditions expects a range of disorders, then give him a table even if it has only one member.

    Ariel

  • Find/replace doesn't work does not correctly

    I'm changing this symbol "<" to a ball of Wingdings.

    I put the symbol in the field of research, but when I stick the ball in the change of field it is a small ball (I'm not the biggest ball stick). When I go ahead and make the discovery then / change options, it replaces the symbol in the document, but the only thing that remains in place is an empty space pink highlighted as if I do not have the police Wingdings.

    Can someone help me solve this today? Thank you!

    Use the tab of the Find/Replace dialog box glyph. It is much more accurate. You can choose exactly what glyphs you want in the find and change of the form:

  • Bug in find/replace - no work around ideas

    With the help of CC2015 on Yosemite.

    There seems to be a bug in find/replace.

    I have a text style in various paragraph styles. The problem is that I also get a lot of tab characters unwanted that I need to delete that are always before a newline (CR). Get rid of them seems simple enough that all I have to do is to find a tab followed by a CR and replace them with a CR. The problem is that when I do it, InDesign changes the paragraph style of the paragraph following the same style as the previous paragraph. Nothing in the find/replace includes anything in the next paragraph, so why should it end up being on? I think it is a bug

    I tried to do this in GREP and also the method of TEXT, and the result is the same. As such, I can't replace the unwanted tabs. The ideas people?

    It is not a bug. Do not delete the return, only the tab.

    Find \t$ should work, or \t(?=\r), but the latter won't find a rear tab in the last paragraph in a story that does not end in a hard return.

    You could do \t+$ or \t+(?=\r) to remove several tabs.

  • Find/replace for text formatting

    Hi guys,.

    How to use find/replace for text formatting changes? I would like to change a text of entire book to try an another typographical options. The book is currently typed in text of Lyon. The problem is when I change to Sabon will make it overides the italics and the word "BOLD".

    I tried to find/display

    Search

    Lyon text regular italic

    Change

    Sabon italic

    Captura de pantalla 2015-02-18 a la(s) 10.17.19.png

    but it does not work. Most of the text of this book is not formatted with the character to italic Style, for example, just a paragraph Style General to make it easier to work with.

    What I am doing wrong? Any help or ideas?


    Thank you!

    All of the text has a paragraph style that applies the formatting of basis for the whole paragraph. ALL text that deviates from the General formatting of the paragraph should have a style of character applied somehow, either directly, or as a nested or style GREP, which overrides the formatting of paragraph and gives what you want. The paragraph styles that do not change the font family are much more useful, for example a style that just changing the text in italics, as they continue to work when you change the font family of the paragraph style in the basic text format section.

    Character styles are used ONLY to change the part of the text in a paragraph. If the paragraph has the same formatting, it should have a paragraph set for this format style.

  • Find + replace empty editable content area

    Nice day

    I created an editable region in a model specially designed for the follow-up of the pixels that change from time to time, depending on the service provider we use for campaigns. That's what the code looks like:

    <!-InstanceBeginEditable name = 'followed'--> <! - InstanceEndEditable - >

    We need to update this empty region with content on several pages 300 +, but the base Find & Replace will do, as it is a region locked in the child page and so - I think - is not "findable". Aside from manually update each page with the tracking pixel (sigh!), there's an ACE in the leg of someone to help me speed up this task?

    Thanks in advance for any help.

    You are right that you can't do this with DW. Best bet is to find another utility to do so. Notepad ++ is an option

    How to "Find and replace" words in multiple files

Maybe you are looking for