If an expression filter does not provide enough flexibility to define filtering criteria, you can use an ASL filter. An ASL filter is an ASL program that processes each notification or other type of object.
The ASL Reference Guide provides detailed information on ASL expressions.
An example ASL filter script, nl-sample-filter.asl, is included in the BASEDIR/smarts/rules/ics directory.