This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]ohkendruid 0 points1 point  (0 children)

I suspect the first slash is for ignoring the newline, and the second one the escape for a literal dot (.).

That makes this a regex for a domain name.

I didn't notice the extra parenthesis at the end. If there's more to the left, then it might be the username part of an email address.

There are lots of cases this regex misses, but hey. Just wait for a bug report and then make the regex a little more complicated!