Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4057
    abgibbs
    Member

    Hello all,

    Fist off — great editor! Best I’ve ever used, by a long shot.

    I need to remove all lines beginning with “IF EXISTS” from a couple thousand .SQL files, but I’m confused on how the “find in files” box handles regex.

    I *should* use:

    Find: IFs{1}EXISTS.+n
    replace:

    However, it doesn’t find any matches when I do this. if I remove the n from the “find” regex it finds all the corret matches but doesn’t include the CRLF at the end of the line. I want to remove the entire line, including the CRLF. Is there something weird about how the “find in files” handles end-of-line characters?

    Thanks!

    #4062
    Yutaka Emura
    Keymaster

    The regular expression is correct if the Keep Modified Files Open is on. However, if the Keep Modified Files Open is off, you must use /r/n for a new line. So the regular expression should be

    IFs{1}EXISTS.+rn

    (if the Keep Modified Files Open is off in the Replace in Files dialog box).

    See Also How to Specify New Lines

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.