473,465 Members | 1,931 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Parsing Based On Capital Words.

1 New Member
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. Then place them into collections. I'm able to place them into collections fine, based on delimiters such as a comma.
I've tried to use the built in commands to do this. However they seem to only take fixed characters rather then muitiple ones.
example:

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

Any help you guys could offer would be great. Thx
May 22 '07 #1
2 1365
DigitalInvertor
21 New Member
You can try something like this... ;>

Dim ip As Integer
Dim triger As Boolean = False
Dim no As Integer
Dim word As Array

For ip = 0 To no - 1
Dim TheText As String
TheText = ---TXT---.Text.ToLower
Dim SearchString As String = word(ip)
If TheText.Contains(SearchString) Then
triger = True
Else
triger = False
Exit For
End If
Next

If triger Then
'some code here
End If
May 22 '07 #2
DigitalInvertor
21 New Member
I forgot some code so here it is again...

Dim ip As Integer
Dim triger As Boolean = False
Dim no As Integer
Dim word As Array

word = ---TXT---.Text.ToLower.Trim().Split(" ")
no = word.GetLength(0)

For ip = 0 To no - 1
Dim TheText As String
TheText = ---TXT---.Text.ToLower
Dim SearchString As String = word(ip)
If TheText.Contains(SearchString) Then
triger = True
Else
triger = False
Exit For
End If
Next

If triger Then
'some code here
End If
May 22 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: filesiteguy | last post by:
I am coming up with a new site, which will be community-driven and subscription-based. I would like for people to go ato a URL that is friendly and easy to remember. Let's say my domain is...
8
by: Gerrit Holl | last post by:
Posted with permission from the author. I have some comments on this PEP, see the (coming) followup to this message. PEP: 321 Title: Date/Time Parsing and Formatting Version: $Revision: 1.3 $...
19
by: ARK | last post by:
I am writing a search program in ASP(VBScript). The user can enter keywords and press submit. The user can separate the keywords by spaces and/or commas and key words may contain plain words,...
2
by: JaythePCguy | last post by:
Hi, I am trying to write a text parser to group all nonprintable and control characters, spaces and space delimited words in different groups using Regex class. Using a parsing of...
4
by: Nishanth | last post by:
Hi, I am facing a problem with one of the requirements. I am going to be getting a string data which I have to parse, The string data sample is something like below.
13
by: Chris Carlen | last post by:
Hi: Having completed enough serial driver code for a TMS320F2812 microcontroller to talk to a terminal, I am now trying different approaches to command interpretation. I have a very simple...
2
by: DCDeshpande | last post by:
Hi, I am new to Java and need to parse a simple txt file into unique tokens and store them in a data structure. Can someone please recommend the most efficient way to do this? I found out that...
1
by: alimsdb | last post by:
This code I have written but even Good not contains all capital words like GOOD the output of my code is All word is capital which is wrong. Can any one help me to solve this problem. my...
5
by: 1337kamikaze | last post by:
I want to be able to take What is the Capital of California?/Sacramento/Redding/Georgia/Iran/A from a text file and seperate it into seperate strings between the / so it would have like ...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.