h Match an "h".
http[s] The part in [square brackets] means to match any of these characters. An "s".
...p[s]? ? means to match zero or one of the preceding regular expression (re).
The preceding re is [s]. So far we can find http or https.
Although they brackets aren't needed, they're visually nice.
...:// Match :// exactly. As in, http://
(?: starts a group that won't be saved for later substitions or pattern reuse.
Doesn't actually match anything
match 1 lower or upper case letter
or a digit
or any of these characters.
WHICH CHARACTERS? Look up $ and _ in an ASCII table.
Since $ precedes _ the hyphen indicates the inclusive range of all characters
between $ and _. @.&+, the uppercase letters, and digits are in this set.
It's redundant. Oh well. The redundancy is not an error.
or any of these characters
or a group. The group is a percent sign followed by two hexadecimal digits.
...)+ close the group. And finally, the + sign means "match 1 or more or the preceding re".
The preceding re is the group in parentheses