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

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

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