use greedy regular expressions

Non-greedy regular expressions require extra syntax and usually
have a specific purpose for their usage. Greedy regular expressions
work fine in all cases currently in this file and are simpler. This
patch changes the regexen to be greedy to make the code more readable.

(credit goes to davidjames for pointing this out)

BUG=none
TEST=Tested by attempting to "repo upload" a non-conforming file.

Change-Id: Id2034e83b3f5d8b3f19b42f1d660b142e05df9ec
Reviewed-on: https://gerrit.chromium.org/gerrit/42638
Reviewed-by: David James <davidjames@chromium.org>
Commit-Queue: David Hendricks <dhendrix@chromium.org>
Tested-by: David Hendricks <dhendrix@chromium.org>
diff --git a/pre-upload.py b/pre-upload.py
index 98cef27..7990b34 100755
--- a/pre-upload.py
+++ b/pre-upload.py
@@ -24,7 +24,7 @@
   r".*\.js$", r".*\.py$", r".*\.sh$", r".*\.rb$", r".*\.pl$", r".*\.pm$",
   # No extension at all, note that ALL CAPS files are black listed in
   # COMMON_EXCLUDED_LIST below.
-  r"(^|.*?[\\\/])[^.]+$",
+  r"(^|.*[\\\/])[^.]+$",
   # Other
   r".*\.java$", r".*\.mk$", r".*\.am$",
 ]
@@ -346,11 +346,11 @@
 def _check_license(project, commit):
   """Verifies the license header."""
   LICENSE_HEADER = (
-     r".*? Copyright \(c\) 20[-0-9]{2,7} The Chromium OS Authors\. All rights "
+     r".* Copyright \(c\) 20[-0-9]{2,7} The Chromium OS Authors\. All rights "
        r"reserved\." "\n"
-     r".*? Use of this source code is governed by a BSD-style license that can "
+     r".* Use of this source code is governed by a BSD-style license that can "
        "be\n"
-     r".*? found in the LICENSE file\."
+     r".* found in the LICENSE file\."
        "\n"
   )
   FAIL_MSG = "License must match"