Replacing Content within Specific Tag

Ask a Question related to Macromedia Exchange Dreamweaver Extensions, Design and Development.

  1. #1

    Default Replacing Content within Specific Tag

    Hi

    Can anyone recommend an extension (or other method) for the following solution?

    I'm trying to replace all the height attributes within all td tags with
    style="height:npx;". I thought I would be able to use the Find and Replace
    within specific tags but it doesn't cater for the values within the attributes.

    For example:

    <td height="n"></td> would change to <td style="height:npx;"></td>

    Any help much appreciated...

    Ronnie

    ronaldbrown Guest

  2. Similar Questions and Discussions

    1. Limiting Editing to specific page content
      I bought this product for this specific reason from the Adobe sales literature: "With Adobe Contribute 4, site administrators can ensure that only...
    2. How to navigate to a specific accordian panel INSIDE a specific tab navigator
      I'm using the tab control as the main navigation for a website. I have a button on tab 1. I want it to point to tab 2 AND open a specific...
    3. Need help with Content-Disposition Content-Type
      I am trying to use the following script to allow users to download files with some of the file name stripped off. This script is for use on my...
    4. Replacing textures
      hi, we're developing web-based applications with large-scaled landscapes and parts of cities. to keep initial file size and texture memory usage...
    5. replacing everything between 2 strings
      Is there a way to replace everything between 2 given strings if it exists? Say I have: $str = "replace anything and everything in here."; Now...
  3. #2

    Default Re: Replacing Content within Specific Tag

    ronaldbrown wrote:
    > <td height="n"></td> would change to <td style="height:npx;"></td>
    Try this:

    Find:

    <td([.\s]*?)height="(\d+)"([.\s]*?)>


    Replace:

    <td$1style="height:$2px;"$3>


    Check Use regular expression


    --
    Danilo Celic
    | Extending Knowledge Daily : [url]http://CommunityMX.com/[/url]
    | Team Macromedia for Dreamweaver : [url]http://macromedia.com/go/team/[/url]
    danilocelic *TMM* Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139