# Input: arg1: string
# Output: return code 0: string is a valid URL
# return code 1: string is NOT a valid URL
# Depends: Bash 5.0.3
# Ref/Attrib: https://stackoverflow.com/a/3184819
regex='(https?|ftp|file|ssh|git)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
# Input: arg1: string
# Output: return code 0: string is a valid URL
# return code 1: string is NOT a valid URL
# Depends: Bash 5.0.3
# Ref/Attrib: https://stackoverflow.com/a/3184819
regex='(https?|ftp|file|ssh|git)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'