Sawmill

DOWNLOAD
SAWMILL 8.5.9
free trial!!
Home Products Downloads Purchase Support About About
Sawmill Sawmill

SAWMILLFORUM

Sawmill Discussion Forum

Subject: "Regular Expression for User and IP Censore"     Previous Topic | Next Topic
Printer-friendly copy    
Conferences Support Topic #4675
Reading Topic #4675
akadasch500
Member since Oct-11-12
Nov-19-12, 01:49 AM (PDT)
Click to EMail akadasch500 Click to send private message to akadasch500 Click to view user profileClick to add this user to your buddy list  
"Regular Expression for User and IP Censore"
 
  
Hello,

i'm working with sawmill and i want to set up the log filter, that in the log file the ip adresses and user names will be censored.

I made this regex:

if (matches_regular_expression(source_ip, "^(<0-9>{1,3}).(<0-9>{1,3}).(<0-9>{1,3}).(<0-9>{1,3})")) then source_ip = "XXX.XXX.XXX.XXX"

and it works. But what i want to do now is, that only the last octett of the IP Adresse will be cenosred in the log e.g.

10.253.192.108 should be 10.253.192.XXX.

Teh second Problem is the username. I want to censore the Username like this:

a1222\ac42v4p to a1222\acXXXX

i made the follwoing reg ex:

if (matches_regular_expression(username, "^(<0-9>{4})\\({2})({5})")) then username = "Zens"

But it doesn't work. Can someone help me please?

Best Regards

akadasch500


  Alert | IP Printer-friendly page | Edit | Reply | Reply With Quote | Top

Conferences | Topics | Previous Topic | Next Topic
© 2012 Flowerfire | Copyright | Privacy Policy | License Agreement | Terms of Use | Contact | Feedback | About
Sawmill Software
Sawmill Software
Back to Sawmill Home