How to extract certain data patterns from vb6 textbox input?

Joined
Jun 30, 2005
Messages
59
Reaction score
0
Hi all .i got the following inside a textbox inside my vb6 form. I am looking for a way to ripp the song path and title from it and use them and insert them to mysql datbase. But i do not know how to ripp those part
i be happy that an expert tell me how i can do it using vb6. The number of song path are not know in before and the parts
that i want to write to mysql are shown in bold.Thanks


data inside my texbox:
Code:
<?xml version="1.0" encoding="UTF-8" ?> 
- <player showDisplay="yes" showPlaylist="yes" autoStart="yes">
  <song path="[B]http://www.mysite.com/TtdlI3l1lIl0OOO0a/singer1/album1/song1.mp3[/B]" title="[B]song title[/B]" /> 
  <song path="[B]http://www.mysite.com/TtdlI3l1lIl0OOO0a/singer1/album1/songname2.mp3[/B]" title="[B]song title 2[/B]" /> 
  
  </player>
 
i dont understand what you are really doing, you might find more help being a little more specific.

However, i made a program in vb to rename id3 tags and filenames of mp3's.

this is the code i used to parse the full paths,
Code:
[size=2][color=#0000ff]
Private[/color][/size][size=2][color=#0000ff]Function[/color][/size][size=2] GetParsedNames([/size][size=2][color=#0000ff]ByVal[/color][/size][size=2] strFull [/size][size=2][color=#0000ff]As[/color][/size][size=2][color=#0000ff]String[/color][/size][size=2])
 
strJustName = "" : strNameExt = ""
 
pthdestination = ""
 
strJustName = System.IO.Path.GetFileNameWithoutExtension(strFull)
 
strNameExt = System.IO.Path.GetFileName(strFull)
 
pthdestination = System.IO.Path.GetDirectoryName(strFull)
 
pthdestination = pthdestination & "\"
 
[/size][size=2][color=#0000ff]End[/color][/size][size=2][color=#0000ff]Function[/color][/size]
[size=2][color=#0000ff]

[/color]as you can see VB has several built in parsers, i found these more reliable then looking for the last "\" and pulling till the last "." though that worked in most cases.[/size]
 
Thank u for u reply. could u tell me how to use u code t extract the bold part data .
 
dim dirtystring ' (full path)
dim strPath ' path without filename
dim strTitle 'filename without extension

Code:
function textbox_onchange() '(on button click, wherever)
	dirtystring=textbox1.text
	getParsednames(dirtystring)
 
 
	 strpath=pthdestination
	 strTitle=strJustName
end function


any more and your gonna have to take the time to type a real question
 
Last edited:
Back
Top