o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

[2005] Parsing a textfile by Delimiters of Capital Words. -

Hey Guys,

I was hoping someone could help me solve a problem I'm having using vb2005 to parse a text file. I'm trying to parse the text file by Sentences that start with Words that are all Captial. Such as, IVORY is a type of Plant.

The idea is parse a sentence at a time that starts with a Word in Full CAPs and place it in a collection.

Such as

"IVORY IS A PLANT" would be item 1 in collection
"SOMEBODY help me" would be item 2 in the collection.

the way the text file is its one solid block of sentences, with random carriage returns.

So I need the program to parse based off setences that start with word in full caps and ends before The next word with full caps. Since the document does not contain periods just commas that are using to complient the sentence not end it.

I've managed to write code that would place delimited values into collections using comma as the limiter. So that I could get the rest of the logic complete. I've tried using the built in commands to do this, however they seemt o only take fixed characters rather then muitiple ones.

Is there a way to check each word, and they when its found place the sentence in.

example:

myreader.textfieldtype= fileio.fieldtype.delimited
myreader.setdelimiters( string like [A-Z])

Any help you guys could offer would be great. Thx

The Code I'm using is.

using myreader as new microsoft.visualbasic.fileio.textfieldparser(".\star.txt")
myreader.textfieldtype = fileio.feildtype.delimited
myreader.setdelimiters(" ")

dim currentrow as string()
while not myreader.endofdata

try
current row=myreader.readfields()
dim currentfield as string

for each current field in currentrow
a=a+1
b.add(currentfield, a.tostring)
next

end try
end using

An example of the text file is.

DOBERMAN A BIG handsome
boy! 1 year, trained & clean, loves
kids! Reg’d, intact
ENGLISH Bulldog pups for sale
home-raised or visit:
www.affordablebullieswer.com
ENGLISH Bulldog pups, vet 4,
shots, dewormed, parents on site,
ready to go $1700

 

Urgent Help ~ Textfile, 2 Delimiters -
Hey, Ive just started an IT degree in australia, and i got a slight problem. CT10;Mission: Impossible III;ACTION;6.00;O,6;O,8;R,9 CT11;SAW III;HORROR;5.00;F,2;F,5;R,8 CT12;THE DEPARTED;DRAMA;7.00;O,1 is the textfile data we got given, what my problem is, that after the 3r


parsing delimiters text -
I am working on a project that requires me to parse delimiters in a text and assign it to a textbox.text, i can read the file but can't parse the delimiter.Does anyone know a good web site that I can use it for refernce. or if you have any examples that I can look at. Thanks


[2005] Loop until there is no more words.. -
I have a listbox and when I click on one item in it , it generates a random line from the selected textfile , and displays the words in it in textboxes.. I want that the selected items will not repeat themselves , I mean when the program generate random line from the textfile and di


Need Help From You Guys -
Hi First thanks for reading my message. i need help in VB. i am doing a programme that can do convertion in text, But i face a lot of problems cos i am new to this VB. The Programme i am doing is to read a textfile and then convert it into another textfile. example... this is the t


[2005] Parsing a textfile by Delimiters of Capital Words. -
Hey Guys, I was hoping someone could help me solve a problem I'm having using vb2005 to parse a text file. I'm trying to parse the text file by Sentences that start with Words that are all Captial. Such as, IVORY is a type of Plant. The idea is parse a sentence at a time that s


String Analyse -
I use the following delimiters in a string tokenizer "\n\t\r\'\",;()-.?!:" I return the delimiters stringTokenizer(input,"\n\t\r\'\",;()-.?!:", true) then I use if token.equal("\n") do somthing and so on to se whits delimiters i have. Are t


If you live in a federal capital:DC, ACT. US view reqd, ignore Oz BULL! -
From what I understand, countries which are federations like the USA and Oz, and I think Nigeria?, have the federal capital on 'neutral' turf like DC, ACT to prevent any state being favoured by the federal government due to having the capital there. That's more or less right, right?


[2005] Regular Expresion to only pull Capital letters -
Does anyone know how to setup a regular express that only pulls the capital letters from a string? For example:' VisualBasic would return VB Does anyone know? Thanks!


Web site vs. website -
I've got a grammar debate going on. What say you? Web site web site Website website My opinion is that Web (capital W) refers exclusively to the World Wide Web that you access through the Internet (capital I). But a web of web pages with a website can be created independently


launching my program with a particular textfile -
I want to launch my program with a particular textfile when that textfile is double-clicked. How would I access the textfile? Under the command prompt, the textfile would be command : c:\test.exe c:\testfile.txt thanks.


Open a textfile. -
Hey guys i'm wondering how do I get a program to open a textfile when the program is launched? Also I need it to search that file for words? Btu how? Thanks


SOLVED : Capital letters -
Hello, I have a textbox and i want that everything that is typed in it will appear in capital letters. How can i do this ? Is there a piece of code with which i can change the text to capital letters while it is typed ?


[2005] Delete Content of a textfile. -
Hi there! It's there a way to erase the content of a textfile without haveing to delete the textfile, just the line in it?


duplicates in txtfile / txtbox -
I have a textfile with about 1 000 000 words in it and a lot of them are duplicates. I want to edit it and remove every one that ISNT a duplicate. Can you also help me with the code doing it for a textbox? (I know 1000000 words would probably crash it but I still want to know)


how to switch these words in a textfile (Array) -
I have this text which is quite large but i need to switch places for some of the items in this array. ie. this is the textfile as it looks now... Alatau;GPS;;ABS Avia;Kazakhstan Turismo;TUS;M3;ABSA - Aerolinhas Brasileiras;Brazil Absolute;AKZ;;Absolute Kazakstan Company, JSC;K


Textfiles /database -
I am not familiar with textfile or databases, so I have a question about this: I have a textfile from about 5 Mb with contains records. Now I will search in the file for certain words and if the word exist in a record then put the record and/or records in a new file or listbox. Who can


Accent marks in C++ -
Hey guys. I wrote a command-line program that stores user-defined words and their associated definitions in a textfile. The program also reads them in so the user can view them or modify them. Now what I'm trying to do is make it so that the user can enter characters with accent mar


Non US Characters -
I am having trouble trying to figure out what I'm looking for. I need to convert characters like ö into %C3%B6 I have been reading for hours and getting more confused. What am I trying to do here, like what should I search. I'm not sure what ö is called and not sure what enc


"cancel" button for a loop. (SOLVED) -
I have a button, when clicked I want it to loop user defined # of words into a box. It basically generates 3 letter random words. but lets say the user wants 10,000 words generated and wants to cancel when it gets to 8000, how would I? the code I have is below. the form_load sets the t


Turn txt to CAPITAL letters -
Hello every1, i am having a small problem. I want to turn a piece of text thatthe user types in a textbox into capital letters. It does not have to be in real-time, i jus want it to be converted into all capitals once the user hits the submit key. Or if tats not possible, i don mind ha


I have problem with textfile, pls help. -
Dear guys, I have a problem with textfile. For example, I have a textfile (already have content), now I wanna find the last line in the textfile and insert a new line. What am I supposed to do? Show me in detail. Thanks for reading my thread. Regards, Fat Bear


[2005] Finding possible matches -
Say I have a textfile with the following words: Apple Bake Bike Cake Lemon Water I want to find all the four letter words with the second letter of 'a' and the fourth letter of 'e'. Something like '_a_e' The matches would be Bake and Cake. How would I find the matches t


So how would I go about doing scanning input from a textfile -
Hello, I am developing an application for a WINDOWS CE 4.2 scanner using VB.NET in Visual Studio 2005. After scanning an item into a text field, I need to make sure that the "item" exists in a textfile. I can figure out how to input the lines of the textfile line by lin


Parsing -
Hi I've been programming for a little while now but I'm still a novice compared to most of you on here. I am VERY new to parsing and I'd like to learn how to do it. I want to be able to search the website www.imdb.com for a particular movie then extract all the info and the movie cover


Replacing Certain Text in a Textfile -
I wanna write a program that will open a specified textfile, read in all the text, find a specific word or group of words in the text, replace those words, and write the new text to a new textfile. Basically, I will have a list of HTML files I want to strip certain codes from in a t


for loop question -
Hello again, Within a .csv file there is a long list of setences separated by a ",". I need to write some VBscript code to: 1. put every tenth sentence into a string/array for saving to a file. ---this would result in 10 arrays. E.G. MyList.csv: some wor


Parsing Strings -
I have this problem, I want to parse a string with certain delimiters. I surfed the net and in VB Script it appears like you have a function called tokenize(). It does not seem to exist in VBA for Access. Is there an easy way to parse strings (equivalent/similar to Java's StringTok


Very Easy TextFile Problem!!! -
Does any body knows how to determine how many lines a textfile has? Please Help! I am uploading from a very large textfile and I dont want my user to keep on watching a blank screen..... Any suggestions? Thanks!


[2005] Encrypt a textfile -
I have a textfile and it is located at C:\adress.txt I want to encrypt that and use a password to encrypt and decrypt because i have another program witch uses that textfile. So you put in a password in a textbox and then you encrypt and then you put in the password and press decrypt


parsing text strings -
Hello, I have a text box and I want to be able to pick out just the words individualy. I can get the number of spaces and the number of words but I am not quite sure how to get the actuall words. if my string is this "Hello, how are you doing?" I want to be able to asso


How to auto capital the letter in textbox -
Is there a property that I can use to set the Textbox to show capital alphabet even if I type using lower case ?


How do you make the first letter a Big Capital -
May someone pls show me how to input or format a textbox such in a way that the name of a user is Gary, Jessie etc .. The First letter is a Big Capital, follow by small letters. Thanks


How to..: keep first Alphabet in capital -
I want to keep first alphabet of every word in a text box to be in capital while entering the data...please help me with some coding.


Pegasus Capital Gold -
Hello, I was wondering if anybody knew what language Pegasus Capital Gold is written in. I have a friend who uses Capital Gold & has recently stopped being able to view the drop-down lisis that display things like multiple addresses etc. I thought that if anybody had knowledge o


in a CSV string is there a way to know how many delimiters there are -
in a CSV string is there a way to know how many delimiters there are for example first,last,address,city is there a way to know how many , are in the above string


help..delimiters -
Ok, another dumb question with removing extra details in a list box. Usually delimiters is used for splitting a text, I guess. Not exactly sure. But wouldn't I be able to split "adduser.php?addid=1234567" to just 123456? This will be in a list box. So, any examples or help wo


[2005] saving into text file from a button.. -
I have 3 textboxes and I when I enter name in text box1 it will create a text file with that name and when I enter 2 words in the textboxes and press button it will write them in that textfile with a space between them, and if I enter more two words it will put them in the second line


Word Mail Merge -
I am have a routine that automates MS Word to create mail merges and it works fine. I need to be able to set what the field and record delimiters are to be for the text document. By default word will accept a ~ for a field and a CLRF for record, but I need to be able to chenge th


[2005] Help with Uploading file [Easy Question] -
I need help with uploading a file to a server. this is my code Code: My.Computer.Network.UploadFile("C:/NitroAfg.txt", "ftp://nitroafg:passs@vbforum.vbforums.com/vbforum.vbforums.com/nitroafg/information.txt") Every time I change the text file it will c


Lock out a textfile -
Hey guys I have a program checks for files on a computer, they are in a textfile. But I am worried people will steal it, is there a way to only let my program use the textfile? thanks!