2
Answers

how to extract substring from a string?

wajid ansari

wajid ansari

16y
7.9k
1
I have a string stored in a variable, say
myString= <RssFeeds<link>http://www.codeguru.com/icom_includes/feeds/codeguru/rss-all.xml</link>
<title>CodeGuru.com</title> <description>something</description></RssFeeds><RssFeeds><link>http://lifehacker.com/index.xml</link>
<title>Lifehacker</title>
<description>something</description>
</RssFeeds>
I want to extract the text between <link>and </link>
and also the text between <title>and </title>
in two different arrays.
How to do this, please help me. if anyone have code or any helpfull link please reply back.

Thanks
Answers (2)