jQuery: Returns only part of a text
- by Warrantica
I want to write a jQuery function that will return only a part of a given text. For example, in the text:
http://somesubdomain.somesite.com/
How can I write a function so that it returns the text "somesubdomain"? In other words, I want to "subtract" the text "http://" and ".somesite.com/".
Thanks in advance