1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Regular Expressions help

Discussion in 'Programming' started by Silver89, Dec 10, 2007.

  1. #1
    Hi,

    I don't use regular expressions much but need to do the foolowing in one in dreamweaver.

    I need to replace all lines starting with:

    [Edit]

    or

    See:

    How can i do this? Also can i remove blank lines?

    Thanks
     
    Silver89, Dec 10, 2007 IP
  2. webmaster_TSU

    webmaster_TSU Peon

    Messages:
    449
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Search for this:

    (\W)Edit(\W)(.*)(hit shift enter here to insert a return)
    Code (markup):
    Replace with nothing.

    And this:

    See:(.*)(hit shift enter here to insert a return)
    Code (markup):
    Replace with nothing.

    These searches will completely delete the line, there will be no blank line since you hit shift+enter at the end to insert a return. I tested it with:

    [Edit] blah blah
    [Edit] lol
    lol ok

    And it replaced to

    lol ok

    Make sure you check "Use regular expressions" and "Search in source code"...can't tell you how many times I've forgotten that. Good idea to save the expression for later, too.

    As for searching for blank lines, I'm not sure.
     
    webmaster_TSU, Dec 10, 2007 IP
    Silver89 likes this.
  3. Silver89

    Silver89 Notable Member

    Messages:
    2,243
    Likes Received:
    72
    Best Answers:
    0
    Trophy Points:
    205
    #3
    Thanks for the help thats great
     
    Silver89, Dec 10, 2007 IP