Ruby regex to match all subdomains for my website? -
Ruby regex to match all subdomains for my website? -
i'm new using regex expressions. need take subdomains like:
something.mysite.com something2.mysite.com anotherthing.mysite.com
what kind of regex can set there if want like:
rack_env['server_name'].match <regex>
you shouldn't using regex here. way go is:
rack_env['server_name'].end_with?(".mysite.com")
ruby regex
Comments
Post a Comment