As much as I love regexes, there are more appropriate tools included in the standard library:
require 'uri'
require 'cgi'
url = "https://example.com/file/filegetrevision.do?fileEntityId=7380079&cs=4Pzbb2jPu3EHBzv8RQHrGcPm4hZZkRC-CfH0my4dP0M.arv"
query = URI::parse(url).query # => "fileEntityId=7380079&cs=4Pzbb2jPu3EHBzv8RQHrGcPm4hZZkRC-CfH0my4dP0M.arv"
fileEntityId = CGI::parse(query)['fileEntityId'] # => ["7380079"]
Then you can check if it is a number or not.