fetch substring from string

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
monikadhingra
Posts: 19
Joined: Fri Dec 13, 2013 6:15 am

fetch substring from string

Post by monikadhingra » Fri Jan 24, 2014 9:31 am

Hi ,
I want to fetch substring from string ,please confirm how i am able to do this.


Regards,
Monika.

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: fetch substring from string

Post by Thierry » Fri Jan 24, 2014 9:58 am

monikadhingra wrote:Hi ,
I want to fetch substring from string ,please confirm how i am able to do this..
Yes, you can :)

Ok, type "offset" in the dictionnary and read about all items you'll find.
There is surely one function which will do the job.

Or give us a bit more details about your string and substring...

Regards,

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

monikadhingra
Posts: 19
Joined: Fri Dec 13, 2013 6:15 am

Re: fetch substring from string

Post by monikadhingra » Mon Jan 27, 2014 7:09 am

Hi ,
Please check below mention html that i am getting from server i want to fetch image from this description,tag is img src for image url.

<table cellpadding='10'><tr><td valign='top'><a href='http://www.wirtschaft.com/soli-einnahme ... rden-euro/' title='"Soli"-Einnahmen &uuml;bersteigen Solidarpakt-Ausgaben bis 2019 um 66 Milliarden Euro'><img src='http://www.wirtschaft.com/wp-content/up ... _33421.jpg' border='0' height='150px' width='200px' /></a></td><td valign='top' align='left'>Berlin &#8211; Die Einnahmen aus dem Solidarit&#228;tszuschlag &#252;bersteigen bis zum Jahr 2019 die Solidarpakt-Ausgaben um 66 Milliarden Euro. Der Solidarit&#228;tszuschlag wird in den n&#228;chsten sechs Jahren rund 99 Milliarden Euro in die Staatskassen sp&#252;len, wie die &#8220;Welt&#8221; unter Berufung auf Berechnungen des Steuerzahlerbundes berichtet. Zugleich wird Bundesfinanzminister Wolfgang Sch&#228;uble (CDU) im selben Zeitraum lediglich 33 [&#8230;]<p>Rubriken: <ul class="post-categories">
<li><a href="http://www.wirtschaft.com/nachrichten/news/" title="Alle Beiträge in News ansehen" rel="category tag">News</a></li>
<li><a href="http://www.wirtschaft.com/nachrichten/schlagzeilen/" title="Alle Beiträge in Schlagzeilen - aktuelle Wirtschaftsnachrichten ansehen" rel="category tag">Schlagzeilen - aktuelle Wirtschaftsnachrichten</a></li>
<li><a href="http://www.wirtschaft.com/nachrichten/w ... utschland/" title="Alle Beiträge in Wirtschaft Deutschland ansehen" rel="category tag">Wirtschaft Deutschland</a></li></ul></p><p></p><table width='100%'><tr><td align=left><p><b>(<a href='http://www.wirtschaft.com/soli-einnahme ... rden-euro/' title='"Soli"-Einnahmen &uuml;bersteigen Solidarpakt-Ausgaben bis 2019 um 66 Milliarden Euro'>Weiterlesen ...</a>)</b></p></td></tr></table></td></tr></table>

Thierry
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 875
Joined: Wed Nov 22, 2006 3:42 pm

Re: fetch substring from string

Post by Thierry » Mon Jan 27, 2014 9:05 am

monikadhingra wrote:Please check below mention html that i am getting from server i want to fetch image from this description,tag is img src for image url.
<img src='http://www.wirtschaft.com/.....

Hello Monika,

You can check my answer in this other thread to get urls out of html text.
This should be a good start..

http://ftp.runrev.com/forums/viewtopic. ... bd2#p89699

PS: If regex are not your cup of tea, then just shout it here, and I'm sure
Klauss, Simon, Jacque or others wil come to the rescue :)

Thierry
!
SUNNY-TDZ.COM doesn't belong to me since 2021.
To contact me, use the Private messages. Merci.
!

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”