diff --git a/docs/manual/OptionalTasks/replaceregexp.html b/docs/manual/OptionalTasks/replaceregexp.html index 930ac3023..c1e9e6ad9 100644 --- a/docs/manual/OptionalTasks/replaceregexp.html +++ b/docs/manual/OptionalTasks/replaceregexp.html @@ -54,7 +54,7 @@ It is strongly recommended to use Jakarta Oro.
${src}/build.properties
This task supports a nested FileSet element.
-This task supports a nested RegularExpression element to specify +
This task supports a nested Regexp element to specify the regular expression. You can use this element to refer to a previously defined regular expression datatype instance.
- <regularexpression id="id" pattern="expression" />
- <regularexpression refid="id" /> + <regexp id="id" pattern="expression" />
+ <regexp refid="id" />
This task supports a nested Substitution element to specify
the substitution pattern. You can use this element to refer to a previously
@@ -112,7 +112,7 @@ value, in the file ${src}/build.properties
<replaceregexp byline="true"> - <regularexpression expression="OldProperty=(.*)" /> + <regexp expression="OldProperty=(.*)" /> <substitution expression="NewProperty=\1" /> <fileset dir="."> <includes="*.properties" /> diff --git a/src/etc/testcases/taskdefs/optional/replaceregexp.xml b/src/etc/testcases/taskdefs/optional/replaceregexp.xml index 1743ccea9..2c61475c5 100644 --- a/src/etc/testcases/taskdefs/optional/replaceregexp.xml +++ b/src/etc/testcases/taskdefs/optional/replaceregexp.xml @@ -10,7 +10,7 @@* *diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java index f19ec289d..add8c0e03 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ReplaceRegExp.java @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2001 The Apache Software Foundation. All rights + * Copyright (c) 2001-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -107,7 +107,7 @@ import java.util.Vector; * replace="pattern" * flags="options"? * byline="true|false"? > - * regularexpression? + * regexp? * substitution? * fileset* * </replaceregexp> @@ -217,7 +217,7 @@ public class ReplaceRegExp extends Task filesets.addElement(set); } - public RegularExpression createRegularExpression() + public RegularExpression createRegexp() { if (regex != null) { throw new BuildException("Only one regular expression is allowed."); diff --git a/src/main/org/apache/tools/ant/types/RegularExpression.java b/src/main/org/apache/tools/ant/types/RegularExpression.java index 48e595ce3..807748e23 100644 --- a/src/main/org/apache/tools/ant/types/RegularExpression.java +++ b/src/main/org/apache/tools/ant/types/RegularExpression.java @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2001 The Apache Software Foundation. All rights + * Copyright (c) 2001-2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -83,7 +83,7 @@ import org.apache.tools.ant.util.regexp.RegexpFactory; * - + - * <regularexpression [ [id="id"] pattern="expression" | refid="id" ] + * <regexp [ [id="id"] pattern="expression" | refid="id" ] * /> ** @@ -96,7 +96,7 @@ import org.apache.tools.ant.util.regexp.RegexpFactory; */ public class RegularExpression extends DataType { - public final static String DATA_TYPE_NAME = "regularexpression"; + public final static String DATA_TYPE_NAME = "regexp"; // The regular expression factory private final static RegexpFactory factory = new RegexpFactory(); @@ -151,7 +151,7 @@ public class RegularExpression extends DataType Object o = ref.getReferencedObject(p); if (!(o instanceof RegularExpression)) { - String msg = ref.getRefId() + " doesn\'t denote a regularexpression"; + String msg = ref.getRefId() + " doesn\'t denote a "+DATA_TYPE_NAME; throw new BuildException(msg); } else diff --git a/src/main/org/apache/tools/ant/types/defaults.properties b/src/main/org/apache/tools/ant/types/defaults.properties index eab5c9a8d..46fbab50d 100644 --- a/src/main/org/apache/tools/ant/types/defaults.properties +++ b/src/main/org/apache/tools/ant/types/defaults.properties @@ -7,4 +7,4 @@ filterset=org.apache.tools.ant.types.FilterSet description=org.apache.tools.ant.types.Description classfileset=org.apache.tools.ant.types.optional.depend.ClassfileSet substitution=org.apache.tools.ant.types.Substitution -regularexpression=org.apache.tools.ant.types.RegularExpression +regexp=org.apache.tools.ant.types.RegularExpression