Regular Expressions TExt Editor

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JoderCoder
    New Member
    • Feb 2008
    • 18

    #1

    Regular Expressions TExt Editor

    Wondering if anyone has a suggestion on what regular expression text editor to use? I have been using only notepad so far, bu need some more sophisticated app to analyze logs etc.. Basically i need to be able to say "delete all lines containing this pattern" or everything but..

    I heard of vim but i think it is for unix mostly (heard that ported to windows as well).

    Any other suggestions?

    BTW, i need a freeware tool ;)

    Thanks!
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by JoderCoder
    Wondering if anyone has a suggestion on what regular expression text editor to use? I have been using only notepad so far, bu need some more sophisticated app to analyze logs etc.. Basically i need to be able to say "delete all lines containing this pattern" or everything but..

    I heard of vim but i think it is for unix mostly (heard that ported to windows as well).

    Any other suggestions?

    BTW, i need a freeware tool ;)

    Thanks!
    vim (or gvim) had its origins in Unix but it does fine on a windows box:
    http://www.vim.org

    kind regards,

    Jos

    Comment

    • JoderCoder
      New Member
      • Feb 2008
      • 18

      #3
      thanks Jos,

      installed gwim..

      I am really a newbie in this kind of scripting, but as far as i can see, i need to write a script (.vim) and run the script when i load my log file.

      I want to remove the lines containing this phrase for example "FromOS"

      Can someone please help me on how to work this out?

      Comment

      • JosAH
        Recognized Expert MVP
        • Mar 2007
        • 11453

        #4
        Originally posted by JoderCoder
        thanks Jos,

        installed gwim..

        I am really a newbie in this kind of scripting, but as far as i can see, i need to write a script (.vim) and run the script when i load my log file.

        I want to remove the lines containing this phrase for example "FromOS"

        Can someone please help me on how to work this out?
        You can do it like this in vim:

        Code:
        1,$s/FromOS/d
        (skip the leading line #1)

        kind regards,

        Jos

        Comment

        • JoderCoder
          New Member
          • Feb 2008
          • 18

          #5
          Originally posted by JosAH
          You can do it like this in vim:

          Code:
          1,$s/FromOS/d
          (skip the leading line #1)

          kind regards,

          Jos
          thanks Jos, i had do it like this
          Code:
          1,$g/FromOS/d
          i would really appreciate if you could assist me with this a bit further. I wonder how can i delete every other line, but the lines containing "FromOS"?

          thanks!!

          Comment

          Working...