diff --git a/Library/Homebrew/livecheck/strategy/bitbucket.rb b/Library/Homebrew/livecheck/strategy/bitbucket.rb index b28ce5e989..48d20a7860 100644 --- a/Library/Homebrew/livecheck/strategy/bitbucket.rb +++ b/Library/Homebrew/livecheck/strategy/bitbucket.rb @@ -30,10 +30,10 @@ module Homebrew class Bitbucket # The `Regexp` used to determine if the strategy applies to the URL. URL_MATCH_REGEX = %r{ - ^https?://bitbucket\.org/ - (?.+?)/ # The path leading up to the get or downloads part - (?get|downloads)/ # An indicator of the file download type - (?(?:[^/]+?[_-])?) # Filename text before the version + ^https?://bitbucket\.org + /(?.+?) # The path leading up to the get or downloads part + /(?get|downloads) # An indicator of the file download type + /(?(?:[^/]+?[_-])?) # Filename text before the version v?\d+(?:\.\d+)+ # The numeric version (?[^/]+) # Filename text after the version }ix.freeze