|
-
Oct 3rd, 2009, 05:08 PM
#1
Thread Starter
Member
[RESOLVED] Txt file read from, read until?
Hi, I'm trying to make a program that can read .mp3 data (Such as Artist, Album, Year, Track number, etc), but I need to be able to do two things that I have no clue how to do:
1. Read starting from a specified string (E.G, On one line it states:
Code:
1 3 9 1 9 2 6 ; A M G p _ i d = P 4 4 7 2 6 ; A M G t _ i d = T 1 4 3 3 1 4 5 7 TPE2 WeezerPRIV " WM/WMCollectionID Ÿ4#ì5Kc [tPRIV ' WM/WMCollectionGroupID Ÿ4#ì5Kc [tPRIV WM/Provider A M G TIT2 Pork And BeansTRCK 89375734TCON Alternative/PunkTCOM Rivers CuomoTPE1 Weezer
I need to read (for track number) Starting from:
)
2. Read until a specified string (E.G, On the previously stated line,
I need to read starting from what I said, up until
Thanks,
-Arightwizard
The following statements are true. The following statement is false. The first statement is true.
-
Oct 3rd, 2009, 10:25 PM
#2
Hyperactive Member
Re: Txt file read from, read until?
i think using Regex is the easiest way for you. Try to google it (i see it but i dont know how to write it)
-
Oct 4th, 2009, 05:26 AM
#3
Hyperactive Member
Re: Txt file read from, read until?
"The only thing that interferes with my learning is my education."
-
Oct 4th, 2009, 08:33 AM
#4
Thread Starter
Member
Re: Txt file read from, read until?
Zeljko, Regex searches for patterns - not in between patterns - so I can't be helped by that.
BadgerBadger, I would prefer not to take someone's work. I only ask this small snippet from VBForums because I could not think of it myself.
Remember I asked to search in between strings, not read from mp3s with ID3 readers.
Thanks,
-Arightwizard
The following statements are true. The following statement is false. The first statement is true.
-
Oct 4th, 2009, 08:45 AM
#5
Hyperactive Member
Re: Txt file read from, read until?
 Originally Posted by Arightwizard
Remember I asked to search in between strings, not read from mp3s with ID3 readers.
Thanks,
-Arightwizard
In that case check out a CodeBank submission made by Vectris which shows you how to get strings in-between strings without using Regex.
"The only thing that interferes with my learning is my education."
-
Oct 4th, 2009, 08:56 AM
#6
Hyperactive Member
Re: Txt file read from, read until?
 Originally Posted by Arightwizard
Zeljko, Regex searches for patterns - not in between patterns - so I can't be helped by that.
...
Remember I asked to search in between strings, not read from mp3s with ID3 readers.
Right, With Regex you can find start string and end string and that givs you the middle - what you want it?
For example search for <p> start tag (paragraph) and end paragraph </p>... in the middle is you string. I see it on web when I look something similar when I need it, but then i picked up something what I can understand (i must admit that regex is preaty hevy to learn in quick maner) from this thread:
http://www.vbforums.com/showthread.php?t=579795
It helped me alot. I know it will help you also
-
Oct 4th, 2009, 11:15 AM
#7
Thread Starter
Member
Re: Txt file read from, read until?
 Originally Posted by Zeljko
Right, With Regex you can find start string and end string and that givs you the middle - what you want it?
For example search for <p> start tag (paragraph) and end paragraph </p>... in the middle is you string. I see it on web when I look something similar when I need it, but then i picked up something what I can understand (i must admit that regex is preaty hevy to learn in quick maner) from this thread:
http://www.vbforums.com/showthread.php?t=579795
It helped me alot. I know it will help you also 
Thanks, that'll do.
The following statements are true. The following statement is false. The first statement is true.
-
Oct 4th, 2009, 12:34 PM
#8
Hyperactive Member
Re: [RESOLVED] Txt file read from, read until?
Please, mark this thread resolved...
-
Oct 4th, 2009, 02:01 PM
#9
Thread Starter
Member
Re: [RESOLVED] Txt file read from, read until?
 Originally Posted by Zeljko
Please, mark this thread resolved... 
" [RESOLVED] Txt file read from, read until?"
The following statements are true. The following statement is false. The first statement is true.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|