You are not logged in.
How can I get the domain name from the string having multiple sub domains?
I'm using tExtractRegexFields component for string filtering.
Below is my Regular Expression to filter the URL string:
It works fine but cannot handle if the URL having few Sub Domains, e.g; stk.se.search.yahoo.com/page?q=abc
I also have to be sure, in which column will I find "Yahoo.com" using tExtractRegexFields, having above example in mind.
Last edited by ilyasiqbal (2012-07-19 09:30:40)
Thanks for that. But I think it cannot help solving the problem and the problem is, not to handle only one specific domain name with .com. I have to make it generic to handle all kind of TLDs e.g;
.com, .se , .us .. etc..
and SubDomains e.g;
AND Then... I also have to be sure, in which column of tExtractRegexFields will I find "Yahoo.com" or "Google.se" or "Ask.com" , having above example in mind.
That means, when you split a string, it goes into different columns of tExtractRegexFields, and to get the last resultant string, it should refer to only one specific column, which I will use to Insert that into a specific table, later on.
You might use it like this.
Add domains as much as you can.
As far as I know, this is the only way to check root domain....
Thanks for your guidence.
Is it also possible to fetch QueryString by extending this ReEx?
e.g; to handle: se.search.yahoo.com/lp.php?a=22&b=44
so that I can get it like:
Actually from above regex, i get a domain name. Based on that I make an SQL Query to fetch a parameter. That param will use to get a certain value from QueryString.
And doing it with another regex, i'll have to write the same query again, which may effect the speed.
Is there a way that I can set a value in Global variable, and can access it anywhere in the job?