The parenthesis are needed if you want to have a capture group which allows you to return the actual url. Without the parenthesis, $regex can only return a 1 or 0 to indicate yes/no whether a url is present. (with /pattern/g it can return greater than 1).

However, because your pattern has the {6,20} containing the comma, mIRC thinks the literal comma indicates another parameter, so it either does something you don't want it to do, or else it errors because of thinking there's too many parameters. For example, the next example tests a string to see if it's base64. The 1st one returns 0 because the literal comma in {2,} confuses $regex. However the 2nd one works fine because the literal comma is placed into the %variable, and so $regex doesn't see the literal comma as an indicator of an extra parameter.

//var %string deadbeef | echo -a $regex(%string,/^[a-zA-Z0-9\/+]{2,}$/)
//var %pattern /^[a-zA-Z0-9\/+]{2,}$/ , %string deadbeef | echo -a $regex(%string,%pattern)

If you don't want to park your pattern into a %variable, you'd need to use $chr(44) like:

//var %string deadbeef | echo -a $regex(%string,/^[a-zA-Z0-9\/+]{2 $+ $chr(44) $+ }$/)