Your Subject line doesn't seem to have any relationship to your problem, so
I've changed it.
Inside a string \s is simply another way to write s. If you want a
backslash in a string you must escape it.
Why are you using strings to create your regular expression at all? Why are
you trying to allow for spaces at a point where they aren't allowed?
var reg = /(<a class=l [^>]*href=")([^"]+)("[^>]*>)/;
should get you a bit further.
Final question, do you really need regular expressions here at all? You are
making a lot of assumptions about exactly how the element has been written:
no quotes round the class attribute, double quotes round the href
attribute, class appears before href. If you parse the responseText into an
HTML DOM then you can just use getElementsByTagName('a') and then pick out
the ones with the right class. In other words, if you want to process HTML
you might be better loading it into an iframe rather than using
XMLHTTPRequest, or if you have control over what you are retrieving send
back XML instead of HTML.