No need for anchors when pattern is used in match()

git-svn-id: https://svn.apache.org/repos/asf/jmeter/trunk@1756307 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java b/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
index e5d9574..7ce2336 100644
--- a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
+++ b/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
@@ -151,7 +151,7 @@
 
     private static final String CONTEXT_METRICS = "jmeter_metrics"; // TODO hack for metrics related to HTTPCLIENT-1081, to be removed later
     
-    private static final Pattern PORT_PATTERN = Pattern.compile("^\\d+$");
+    private static final Pattern PORT_PATTERN = Pattern.compile("\\d+"); // only used in .matches(), no need for anchors
 
     private static final ConnectionKeepAliveStrategy IDLE_STRATEGY = new DefaultConnectionKeepAliveStrategy(){
         @Override
diff --git a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpWebdav.java b/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpWebdav.java
index f42e18c..60cdef4 100644
--- a/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpWebdav.java
+++ b/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HttpWebdav.java
@@ -31,7 +31,7 @@
 public final class HttpWebdav extends HttpEntityEnclosingRequestBase {
     // A HTTP method can be a token as specified in
     // https://tools.ietf.org/html/rfc7230#section-3.2.6
-    private static final Pattern WEBDAV_METHOD_PATTERN = Pattern.compile("^(?i)[\\da-z!#$%&'*+\\-.^_`|~]+$");
+    private static final Pattern WEBDAV_METHOD_PATTERN = Pattern.compile("(?i)[\\da-z!#$%&'*+\\-.^_`|~]+"); // only used in .matches(), no need for anchors
     
     private final String davMethod;