Search for an Expression/Phase and Delete lines

Search for an Expression/Phase and Delete lines

7
NewbieNewbie
7

    Oct 16, 2005#1

    Hi all,

    I am wondering if there is a way to search on a expression/phase and delete the whole line?

    Example: I am trying to delete the line with the X400 address on 4000 users

    dn: CN=xxx xxx,CN=Users,DC=home,DC=ca
    changetype: modify
    proxyAddresses: SMTP:[email protected]
    proxyAddresses:
    X500:/o=home/ou=First Administrative Group/cn=Recipients/cn=xxxxxx
    proxyAddresses: X400:c=us;a= ;p=home;o=Exchange;s=xxx;g=xxx;

    dn: CN=yyy yyy,CN=Users,DC=home,DC=ca
    changetype: modify
    proxyAddresses:
    proxyAddresses:
    X500:/o=home/ou=First Administrative Group/cn=Recipients/cn=yyyyyy
    proxyAddresses: SMTP:[email protected]
    proxyAddresses: X400:c=us;a= ;p=home;o=Exchange;s=yyy;g=yyy;

    Thanks for any help.
    DCB

    6,686585
    Grand MasterGrand Master
    6,686585

      Oct 16, 2005#2

      That's an easy regular expression replace. In UltraEdit style:

      Find What: %proxyAddresses: X400:*^p
      Replace With:

      And in Unix style:

      Find What: ^proxyAddresses: X400:.*\p
      Replace With:

      The style is set at Advanced - Configuration - Find - Unix style Regular Expressions.

      And make sure, the last line of the file is a blank line, if the last line with characters is a X400: line. ^p or \p means line ending and not also end of file!!!
      Best regards from an UC/UE/UES for Windows user from Austria

      7
      NewbieNewbie
      7

        Oct 17, 2005#3

        Thank you for your quick response Mofi; I do appriciate your assistance.

        I got it working using "^proxyAddresses: X400:.*\p". Thank you again.
        David.