Both are regex instructions, considering the code you provided yourself they are being used to replace the unwanted html content of certain strings.
/</g
Its purpose is to identify the effects of <
and the g
specifies that the query must be performed in the entire string
Considering the application in your code it is replacing the incidences of '<' by its equivalence in ASCII code '<' in general this serves to prevent browsers from understanding the character '<' as html code.
http:\/\/\S+
Its purpose is to identify the incidences of words beginning with http://
and the S+
informs that http:// can be followed by any character other than a space.
Considering the application of your code this would aim to remove the incidences of urls from the string.
It is worth noting that all these regex instructions are poorly written and little restricted, summarizing would probably replace a lot of unwanted things
Reading tip : http://answall.com/questions/110701/o-que-significa-o-shortcut-s-nas-regex
– Guilherme Lautert