by BruteForce » Sun Jun 17, 2007 2:28 pm
This works perfectly on lines that contain scanned ports list but is zapping all the commas on lines that do not. Example:
06/02/2007 22:56:36.224 - UDP packet dropped - 66.129.65.54, 12069, WAN - 209.20.251.204, 33435, WAN - UDP Port: 33435
turns into:
06/02/2007 22:56:36.224 , UDP packet dropped , 66.129.65.54 12069 , 209.20.251.204 33435 , UDP Port: 33435
Note we lost the commas between IP & port number. I need to retain those.
Here is the whole macro so far:
InsertMode
ColumnModeOff
HexOff
PerlReOn
TabsToSpaces
Find RegExp "(\.\d{1,3}),( \d{1,4}),( WAN)"
Replace All "\1;\2;\3"
Find ","
Replace All ""
Find ";"
Replace All ","
Find "WAN"
Replace All ""
Find "LAN (admin)"
Replace All ""
Find "LAN"
Replace All ""
Find "'"
Replace All ""
Find "-"
Replace All ","
Find ", ,"
Replace All ","
Find "[5 space chars]"
Replace All " "
Find "[4 space chars]"
Replace All " "
Find "[3 space chars]"
Replace All " "
Find "[2 space chars]"
Replace All " "
Find " , "
Replace All ","
Save
(added "[X space chars]" as the number of empty spaces does not show correctly in HTML)