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

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

Hibernate criteria by a list of natural ids -

ios - Lagging ScrollView with UIWebview inside -