mattdarnell Member Licensed User Longtime User Sep 1, 2012 #1 Aloha, I am trying to parse the <description> from the Dan Patrick feed. I am able to load the following into a string, this is the log output: Eli Manning on Hakeem Nicks' health, Peyton's start and Giants' attitude.<img src="http://feeds.feedburner.com/~r/services/podcasting/danpatrick/rss/~4/htEW80aCkRI" height="1" width="1"/> What would be the best way to drop everything in the '<img src....' portion? I get crashes no matter what string manipulation I try. The actual feed can be found here: The Dan Patrick Show: Podcast If you do view source, it looks a bit different. Thanks for the help. Aloha, Matt Last edited: Sep 1, 2012
Aloha, I am trying to parse the <description> from the Dan Patrick feed. I am able to load the following into a string, this is the log output: Eli Manning on Hakeem Nicks' health, Peyton's start and Giants' attitude.<img src="http://feeds.feedburner.com/~r/services/podcasting/danpatrick/rss/~4/htEW80aCkRI" height="1" width="1"/> What would be the best way to drop everything in the '<img src....' portion? I get crashes no matter what string manipulation I try. The actual feed can be found here: The Dan Patrick Show: Podcast If you do view source, it looks a bit different. Thanks for the help. Aloha, Matt
mattdarnell Member Licensed User Longtime User Sep 1, 2012 #2 This code works just fine, it drops everything after "<". I added the quotation marks to make sure that wasn't the issue. Let me check the previous code now that I have slept! Dim i,k As String Dim j As Int i = "Eli Manning on, " & QUOTE & "Peyton's" & QUOTE & " start and.< Giants' attitude" j=i.indexof("<") k=i.SubString2(0,j) Log(i) Log(k) -Matt Upvote 0
This code works just fine, it drops everything after "<". I added the quotation marks to make sure that wasn't the issue. Let me check the previous code now that I have slept! Dim i,k As String Dim j As Int i = "Eli Manning on, " & QUOTE & "Peyton's" & QUOTE & " start and.< Giants' attitude" j=i.indexof("<") k=i.SubString2(0,j) Log(i) Log(k) -Matt
mattdarnell Member Licensed User Longtime User Sep 1, 2012 #3 Ended up being a run time error where I was trying to get the substring when using -1 as one of the inputs. I see you can put break points into the IDE, they don't seem to stop the application. In VB6 you could stop at a break point, hover over a variable and it would give you the value. -Matt Upvote 0
Ended up being a run time error where I was trying to get the substring when using -1 as one of the inputs. I see you can put break points into the IDE, they don't seem to stop the application. In VB6 you could stop at a break point, hover over a variable and it would give you the value. -Matt
mc73 Well-Known Member Licensed User Longtime User Sep 2, 2012 #4 -1 is the result of indexOf when the search string is not found, same thing holds true with vb6. Testing your given string, however, no error was received: Code: Copy Dim i,k As String Dim j As Int i="Eli Manning on Hakeem Nicks' health, Peyton's start and Giants' attitude.<" j=i.IndexOf ("<") k=i.SubString2 (0,j) Msgbox(k,"ok") Upvote 0
-1 is the result of indexOf when the search string is not found, same thing holds true with vb6. Testing your given string, however, no error was received: Code: Copy Dim i,k As String Dim j As Int i="Eli Manning on Hakeem Nicks' health, Peyton's start and Giants' attitude.<" j=i.IndexOf ("<") k=i.SubString2 (0,j) Msgbox(k,"ok")