jQuery: Returns only part of a text
Posted
by Warrantica
on Stack Overflow
See other posts from Stack Overflow
or by Warrantica
Published on 2010-04-20T05:51:32Z
Indexed on
2010/04/20
5:53 UTC
Read the original article
Hit count: 199
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
© Stack Overflow or respective owner