content: set theURL to "https://canary.discord.com/app"
  set firstReq to do shell script "curl " & quoted form of theURL
  set asset_reg to "/assets/[a-zA-Z0-9]+.js*"
  
  singleMatch(firstReq, asset_reg)
  set found_assets to my findPattern:"/assets/[a-zA-Z0-9]+.js*" inString:firstReq
  set listSize to count of found_assets
  set theAsset to item (listSize) of found_assets
  
  # TODO make release channel logic since this is currently limited to canary
  set secondReq to do shell script "curl " & quoted form of ("https://canary.discord.com" & theAsset)
  set raw_build_data to my findPattern:"Build Number: [0-9]*, Version Hash: [A-Za-z0-9]*" inString:secondReq
  
  # Return scheme
  # "Build Number: 00000, Version Hash: 9v9v9v9v9v9v9v9v9v9v9v9v9v9v9"
  set unlisted_version_data to item (count of raw_build_data) of raw_build_data
  
  # Single matching regex
  on singleMatch(str, reg)
  	local ignoreCase, extraCommand
  	set ignoreCase to "a" is "A"
  	if ignoreCase then
  		set extraCommand to "shopt -s nocasematch; "
  	else
  		set extraCommand to ""
  	end if
  	tell me to do shell script "export LANG='" & user locale of (system info) & ".UTF-8'; shopt -s compat31; " & extraCommand & "[[ " & quoted form of str & " =~ " & quoted form of reg & " ]] && printf '%s\\n' \"${BASH_REMATCH[@]}\" || printf ''"
  	return paragraphs of result
  end singleMatch
  
  
  # Objective-C regex implementation
  use framework "Foundation"
  
  property NSRegularExpression : class "NSRegularExpression"
  property NSString : class "NSString"
  
  on findPattern:thePattern inString:theString
  	set theText to NSString's stringWithString:theString
  	set theRegEx to NSRegularExpression's regularExpressionWithPattern:thePattern ¬
  		options:0 |error|:(missing value)
  	set theResult to (theRegEx's matchesInString:theText ¬
  		options:0 ¬
  		range:{location:0, |length|:theText's |length|})'s valueForKey:("range")
  
  	set outputArray to {}
  	repeat with thisRange in theResult
  		copy (theText's substringWithRange:thisRange) as text to end of outputArray
  	end repeat
  	return outputArray
  end findPattern:inString:
  