Tapatalk

Finds TD-Tags (HTML) without align="*"

Finds TD-Tags (HTML) without align="*"

CrazyWolf

    Dec 25, 2005#1

    Hello,

    i have a little Problem. I have an Application ( PHP / HTML ) with hundrets of Templates. When a TD-Tag has to be text-align left, i did nothing. In IE and Firefox it is automatically left. In Opera and IE 7 ( Vista ) its center when no align is given.
    Now i have to find all Templates, who have TD-Tags without an align-param.
    Tried such like:
    <td*^(align="*")*>
    But no chance for me. Can anyone help me?
    The best would be to search the Tags without align params, and insert automatically align="left" at the end of the TD-Tag.
    Is this possible with Ultraedit?

    Thanks and Greetings

    6,685587
    Grand MasterGrand Master
    6,685587

      Dec 27, 2005#2

      I'm developing html files with Opera as default browser and IE and Firefox as additional test browsers and I never noticed, that Opera aligns table cell contents by default centered. I guess, you use a document type mode which is not correctly interpreted by current IE and Firefox or you have the CSS informations not set correctly.

      Back to your search and replace problem. It is not possible to find a string which does not contain a specified word. But there is a workaround for your problem.

      First do following search and replace in UltraEdit style.

      Find What: <td^(*^)>
      Replace With: <td^1 align="left">

      Now all table cells are aligned left. With 2 additional search and replaces, we remove left alignment attribute for all table cells, which already have an alignment specified.

      Find What: <td^(*align="[~"]+"^) align="left">
      Replace With: <td^1>
      Find What: <td^(*align="[~"]+" *^) align="left">
      Replace With: <td^1>
      Best regards from an UC/UE/UES for Windows user from Austria