in reply to Re^2: Multiple Search and Replaces on one file
in thread Multiple Search and Replaces on one file

Your making an assumption that each log entry does not have the same syntax. I am making the assumption that it does because that is what the OP's example shows. Where do you get your info from?

Also I am not missing anything from my regexp. Maybe you think my example was trying to match something it was not.
  • Comment on Re^3: Multiple Search and Replaces on one file

Replies are listed 'Best First'.
Re^4: Multiple Search and Replaces on one file
by fishbot_v2 (Chaplain) on Jun 15, 2005 at 22:11 UTC

    Here is his example:

    6/13/2005 5:59:57 PM 10.1.1.2 WARNING Jun 13 2005 22:00:04: %PIX-4-106 +023: Deny udp src aliens:192.168.1.35/1148 dst dmz:10.10.10.32/1434 b +y access-group "aliens"
    He said that he wanted to convert the Jun (in the second timestamp) to 06. Earlier in the log entry, there is another timestamp. The first timestamp appears to be from 5:59 pm, the second around 10:00 pm. You are making the assumption that the two datestrings in the log file are identical and interchangable.

    Regex error: "(%PIX+)" this matches what? "%PIX" and then an unlimited number of Xs? You surely mean "(%PIX.+)", since the way you have it deletes everything in his example log entry after the 'X'.