Partial HREF value of find/replace

Hi all.

I'm having a heckofa problem and was hoping that someone on these boards may be able to help.

I have 1000s of links that I need to deal with, and I'm afraid to do it by hand. Many links are now bad links - and they are & quot; bad & quot; in a very predictable way, as they it comme ils l' appellent call contain & quot; PHP? title = & quot; -If I want to find the bad code link and simply remove the & lt; anchor & gt; tag and leave the text containing such what.

My guess is that this should not be as difficult as it is, but I could be very wrong here.

So, I did the following in the Find/Replace dialog box:

Search: Specific tag
Selected tag: has
With attribute: HREF

Here is where I get confused. The & quot; attribute & quot; option has & quot; =, & lt; & gt;! = & quot; as the optoins. So I tried the equality operator using two regular expressoins (* php\? title\ = *) and without regular expressions(php?title), but no matter what I do, no links are. I'm very new to regex so maybe my code here is maybe bad. I wish there was a & quot; container & quot; the option with exposed attribute, but there isn't.

So: do one of the y ' All DW gurus have ideas on this subject? I'm pulling what I left aside during this little hair.

Thank you
Joe

Hey there ' All:

Sorry for the late reply.

That did the trick! I really can't thank you all enough for taking the time to help me with this. I was really at a loss. I think it's clear I need to stop procrastinating and to learn more about regular expressions.

Slightly OT: books that y ' All is recommended for learning regular expressions? The great oreilly one?

Thanks again. I enjoyed all your help.

Joe

Tags: Dreamweaver

Similar Questions

  • Find/replace wildcards

    Greetings!

    I have a page that contains the code that is generated by a program that adds a javascript image gallery, which works fine, but the customer has requested to NOT to display the popup tooltips coming from the attribute "title" image when hovered by browsers. This software puts the name of the image file in the title and alt attributes of the code, and I want to do is use a find/change command to clear all the attributes title, but so far nothing I've come with works.

    I have literally hundreds of these images and two of each version small and large image... Since the alt tag is still there screen readers will be able to work, and we need not display titles that are not important...

    I'm not familiar with the method of this kind of coding find Dreamweaver and web pages I looked me have not given much to work with...

    Here is an example of the copied code from one of the pages:

    < div id = "vlightbox1" >

    "" < a class = "vlightbox1" href="data/images1/cimg4464.jpg" title = "CIMG4464" > < img src="data/thumbnails1/cimg4464.jpg" alt = "CIMG4464" / > < / has >

    "" < a class = "vlightbox1" href="data/images1/cimg5426.jpg" title = "CIMG5426" > < img src="data/thumbnails1/cimg5426.jpg" alt = "CIMG5426" / > < / has >

    "" < a class = "vlightbox1" href="data/images1/cimg5427.jpg" title = "CIMG5427" > < img src="data/thumbnails1/cimg5427.jpg" alt = "CIMG5427" / > < / has >

    "" < a class = "vlightbox1" href="data/images1/cimg5429.jpg" title = "CIMG5429" > < img src="data/thumbnails1/cimg5429.jpg" alt = "CIMG5429" / > < / has >

    "' Y at - it a find which can be built that would release the titles of"title ="" '?

    Thanks in advance!...

    As a backup, copy your page before doing so.

    Find & replace (Ctrl + F)

    Find: current Document

    Search: specific tag one

    With the attribute href = any value

    + - With title attribute value = any

    Action: Set title attribute [empty]

    Hit replace all

    Nancy O.
    ALT-Web Design & Publishing
    Web | Graphics | Print | Media specialists
    http://ALT-Web.com/
    http://Twitter.com/ALTWEB

  • Find/replace style cell with GREP

    Hi all, (my first post here)

    I found a script very useful on this forum to find/replace cell styles in an array. I adapted the script using Peter Kahrel ebook for use with a GREP query.

    I've linked to a spreadsheet in InDesign CC 2014 I want to highlight the cell of new products that contain the value [Y].

    When I run the script below, I get random results.

    myDoc = app.activeDocument var

    app.findGrepPreferences = app.changeGrepPreferences = null

    app.findGrepPreferences.findWhat = "\[\u\"]

    var myFound = myDoc.findGrep)

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

    {

    If (. parent.constructor.name myFound [i] == "Cell")

    {

    . parent.appliedCellStyle myFound [i] = "New_Product_Cell".

    }

    }

    Modify the script that I wrote above.

    Otherwise your discovery is just '[u]' ==> multi-ad found is--> Direct manufacturer name


    Jarek

  • 'Wild card' in find/replace changes 'any number' to ' ^ 9' instead of leaving as is.

    During a search, find/replace in indd, using the generic specification for any number (^ 9), I would have thought the change would leave the numbers in their original state but it change them all to ' ^ 9' - how can I find a large document and remove all values in dollars using find/replace - e.g. AUD 3 234 to 3234 AUD?

    Given that you have at least InDesign CS3, use GREP to search instead of text search:

    Search: AUD (\d+)\h(\d\d\d)

    Change from: AUD $1$ 2

    Or probably even better, change to: $1, $2 ~.<>

    $1 and $2 rely on the conclusions of the first and the second parenthesis.

    ~< adds="" a="" thin="" space="" between="" last="" number="" and="" currency="">

  • Do find/replace multiple records at the same time?

    Hello

    I wonder if there is a way to apply the options find/replace, I select all the records that I have given merged in my InDesign file.

    Reserved spaces will not import my database spaces, example if I

    Model InDesign: < < bird > >

    < < beak > > < < beak value > >

    .csv:                              bird's beak,,, value of beak

    Eagle, beak:, Hung

    I get

    InDesign after the merger of data: Eagle

    beak: hung

    No spaces came with the merger.  If there is an option to preserve the spaces, it would be the simplest solution. However, I'm not finding such a command, so I would like to add a special character after my colon in the .csv and then use ID to find/replace this character in each of my files in a space or two.  Any ideas?

    Thank you.

    Edit: even on a single record, find/replace is not applied to my output document, either... Its release the special character that I wrote in the fields of .csv instead of space, it is supposed to transform.

    Post edited by: EX_Achilles

    Yes.

    Make sure that you set the scope of the search and replace of the Document. He may have missed the selection or history.

  • Find + replace text (string constant) does not work for screw Statechart module

    Hello

    I tried to do a mass find + replace a string in my code. Using Ctrl + F, LabVIEW 2012 correctly locates all the places where this string exists, including within the States transitions guards who have paths in this form:

    XYZ.lvsciagram.vi / Transition: Guard - diagram, Transition, data/part

    However, when I've specified that a replacement string, then click on 'Replace all', only 'normal' instances of screws replaced - instances in my diagrams had not changed.

    What is going on? Is there anything else I need to do?

    Thanks in advance.

    Looks like those that does not include how to find and replace is implemented in LabVIEW. You can try to replace just the statechart and see if that makes a difference, but it may simply not work.

  • object contains no text for find/replace

    I am trying to run this script to select text if it is found, but he said that there is no text, even though I have wrapped them in an if statement.

    See section function () {}

    app.findGrepPreferences = app.changeGrepPreferences = null;

    app.findGrepPreferences.findWhat = "the (section\\s +?). \\d+ ? [ \\.\\d+]?)";

    app.changeGrepPreferences.changeTo = "$1";

    The app.changeGrepPreferences reference .appliedCharacterStyle = "cross";

    If (app.activeDocument.findText ()) {}

    found. Select();

    };

    var changes1 = app.activeDocument.changeGrep ();

    If {(changes1.length===1)}

    Alert (changes1.length + "instance of 'the section' became 'article'.");

    } else {}

    Alert (changes1.length + "instances of 'the section' changed to 'section'.");

    }

    };

    Your message to find/replace script highlight found text is not the same question?

  • Find/replace, highlight found text script

    Hello

    I wrote this script and it works fine. But what I want to do is to go through each word found individually (as in the Find/Replace dialog box with the button "find next").

    This is an excerpt:

    app.findTextPreferences = app.changeTextPreferences = null;
    var what = app.findTextPreferences.findWhat = "ensure";

    app.changeTextPreferences.changeTo = "make" sure;
    var found = app.activeDocument.changeText ();
    If {(found.length = 1)
    Alert (found.length + "instance of"ensuring"changed");
    } else {}
    Alert (found.length + "instances of"ensuring"changed");
    }

    I want the script to each instance of "ensure" my active selection that I can see where they are before I change.

    Thank you

    Hi guys,.

    try this one:

    app.findTextPreferences = app.changeTextPreferences = null;
    app.findTextPreferences.findWhat = "ensure";
    app.changeTextPreferences.changeTo = "make sure";
    
    var allFounds = app.activeDocument.findText();
    for (var i = 0; i < allFounds.length; i++) {
      var curFound = allFounds[i];
      curFound.select();
      app.layoutWindows[0].zoomPercentage = app.layoutWindows[0].zoomPercentage;
       if(confirm("Do you wish to change this instance?",undefined, "Find/Replace")) {
         curFound.changeText();
      }
    }
    
    app.findTextPreferences = app.changeTextPreferences = null;
    

    Disadvantage of the confirm dialog box: there is no exit button.

  • 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

  • Disappeared from the Find/Replace dialog box

    Hello. Find/replace is not dimmed, but the dialog box won't appear on the screen. Does anyone have a solution? Thank you!

    InDesign CC 2015.1 (Build 11.1.0.122).

    OSX 10.10.5 Mac Pro (mid-2012)

    I just removed the search panel and change plug-in in the plug-ins folder of text and then dragged it back to the and who brought. Thanks for your time, Steve.

  • 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]:

  • 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);

  • 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 .

  • Find/replace 3 space selection

    Dear friends,

    I tried to find/replace for space 3 replace the symbol of selection (please see my code below). How to replace?

    app.findTextPreferences = NothingEnum.nothing;
    app.changeTextPreferences = NothingEnum.nothing;
    app.findTextPreferences.findWhat = "..."
    app.changeTextPreferences.appliedGlyph = "&#x2026;";
    app.activeDocument.changeText();
    
    

    Please suggest a friend.

    Thanks in advance

    Hello

    Try this,

    app.findTextPreferences = NothingEnum.nothing;

    app.changeTextPreferences = NothingEnum.nothing;

    app.findTextPreferences.findWhat = «...» »

    app.changeTextPreferences.changeTo = "^ e";

    app.activeDocument.changeText ();

Maybe you are looking for