Any way to get property filtering doing an exact match?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Any way to get property filtering doing an exact match?

Nicholas Duane

I'm using the PropertyFilter class which I assumed, I guess wrongly so, that the StringToMatch would be for an exact match.  It seems that's not the case and a match is detected if the StringToMatch is a substring of the property value.  Is there a way to get an exact match without having to write my own filter or use regular expressions?


Thanks,

Nick

Reply | Threaded
Open this post in threaded view
|

RE: Any way to get property filtering doing an exact match?

Radovan Raszka

Hi,

see documentation, it explains how it works:

StringMatchFilter.StringToMatch Property - The string that will be substring matched against the rendered message. If the message contains this string then the filter will match. If a match is found then the result depends on the value of AcceptOnMatch.

 

StringMatchFilter.RegexToMatch Property - The regular expression pattern that will be matched against the rendered message. If the message matches this pattern then the filter will match. If a match is found then the result depends on the value of AcceptOnMatch.

One of StringToMatch or RegexToMatch must be specified.

 

So probably you need to use RegexToMatch to detect exact string value.

 

Radovan

 

From: Nicholas Duane [mailto:[hidden email]]
Sent: Tuesday, November 15, 2016 7:06 PM
To: [hidden email]
Subject: Any way to get property filtering doing an exact match?

 

I'm using the PropertyFilter class which I assumed, I guess wrongly so, that the StringToMatch would be for an exact match.  It seems that's not the case and a match is detected if the StringToMatch is a substring of the property value.  Is there a way to get an exact match without having to write my own filter or use regular expressions?

 

Thanks,

Nick