StripFilter

Description

Stripfilter is used to strip input lines that match the specified pattern.
Stripfilter may be used directly within a filterchain. In this case a tokenfilter is created implicitly. An extra attribute "byline" is added to stripfilter to specify whether to use a linetokenizer (byline="true") or a filetokenizer (byline="false"). The default is "true".

Definition

<typedef name="stripfilter"
         classname="net.sf.antcount.filters.StripFilter"
         classpath="antcount.jar" />

Attributes

Name Description Required Default
contains The input will be stripped only if it contains this string. No Strip all input
match The input will be stripped only if it matches this regular expression. No Count all input

Examples

Strip each lines that contains a number.

<concat>
  <fileset dir="${logs.dir}" includes="**" />
  <filterchain>
    <stripfilter match="[0-9\.]+" />
  <filterchain/>
</concat>