Class Matches
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.taskdefs.condition.Matches
Simple regular expression condition.
- Since:
- Ant 1.7
- 
Field SummaryFields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddRegexp(RegularExpression regularExpression) A regular expression.booleaneval()Is this condition true?voidsetCasesensitive(boolean b) Whether to ignore case or not.voidsetMultiline(boolean b) Whether to match should be multiline.voidsetPattern(String pattern) Set the regular expression to match againstvoidsetSingleLine(boolean b) Whether to treat input as singleline ('.' matches newline).voidSet the stringMethods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
- 
Constructor Details- 
Matchespublic Matches()
 
- 
- 
Method Details- 
setString
- 
setPatternSet the regular expression to match against- Parameters:
- pattern- the regular expression pattern
 
- 
addRegexpA regular expression. You can use this element to refer to a previously defined regular expression datatype instance- Parameters:
- regularExpression- the regular expression object to be configured as an element
 
- 
setCasesensitivepublic void setCasesensitive(boolean b) Whether to ignore case or not.- Parameters:
- b- if false, ignore case.
- Since:
- Ant 1.7
 
- 
setMultilinepublic void setMultiline(boolean b) Whether to match should be multiline.- Parameters:
- b- the value to set.
 
- 
setSingleLinepublic void setSingleLine(boolean b) Whether to treat input as singleline ('.' matches newline). Corresponds to java.util.regex.Pattern.DOTALL.- Parameters:
- b- the value to set.
 
- 
evalDescription copied from interface:ConditionIs this condition true?- Specified by:
- evalin interface- Condition
- Returns:
- true if the string matches the regular expression pattern
- Throws:
- BuildException- if the attributes are not set correctly
 
 
-