Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

filters + reg expr

Hello,

I'm new working with ESA C660 version 7.5.1 and i have a little bit problem with a filter and regular expressions, i'm not so smart in it

I would like this :

when header "To" have (at least) a recipient like adress@domain.toto.com, then erase it, where domain is not fix.

They could be many adress...

So, a partnet makes this :

test1: if recv-listener == "outgoing" {

     if header("To") == "(?i)@[^\\.]+\\.toto\\.com" {

          edit-header-text("To", "(?i)[^,]+@[^\\.]+\\.toto\\.com+[^,]", "");

     }

}

But it doesn't work very well... Could you have any idea why ?

Sorry for my poor english and thanks for your help!

Everyone's tags (2)
2 REPLIES

filters + reg expr

Hello Jennifer,

haven't tested this yet, does it work in some cases or not at all?

Regards,

Andreas

New Member

filters + reg expr

Hello Andreas,

Little change in the filter, i add a "*" after toto\\.com+[^,] :

test1: if recv-listener == "outgoing" {

     if header("To") == "(?i)@[^\\.]+\\.toto\\.com" {

          edit-header-text("To", "(?i)[^,]+@[^\\.]+\\.toto\\.com+[^,]*", "");

     }

}

It complicates, it works... in almost all cases ...

When i have "address@gmail.com,local@mail.toto.com" that's ok

When i have "address@gmail.com,local@mail.toto.com,local2@mail.toto.com", i receive "address@gmail.com,"

And i would like "address@gmail.com"

Is there a way to erase the "," at the same time ?

Thanks !

527
Views
0
Helpful
2
Replies
CreatePlease login to create content