473,320 Members | 1,881 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

how can we break the line from the space between two words

hi,
i m developing one application in which i have to compare
two documents and collect the word which has the error. for that
purpose i need to break the line into words from the space between the
words.how can i do it.

Oct 1 '06 #1
4 1290

Regular expressions are your friend :)
http://msdn2.microsoft.com/en-us/library/hs600312.aspx

Or, if your words are only separated by single spaces, try
String.Split()
http://msdn2.microsoft.com/en-us/lib...ing.split.aspx

kundan kumar wrote:
hi,
i m developing one application in which i have to compare
two documents and collect the word which has the error. for that
purpose i need to break the line into words from the space between the
words.how can i do it.
Oct 1 '06 #2
strText = strText.Replace(" ", vbCrLf)

kundan kumar wrote:
hi,
i m developing one application in which i have to compare
two documents and collect the word which has the error. for that
purpose i need to break the line into words from the space between the
words.how can i do it.
Oct 1 '06 #3
strText = strText.Replace(" ", vbCrLf)

If the text output is a web page you may using somthing like this

strText = strText.Replace(" ", "<br />")
kundan kumar wrote:
hi,
i m developing one application in which i have to compare
two documents and collect the word which has the error. for that
purpose i need to break the line into words from the space between the
words.how can i do it.
Oct 1 '06 #4
stringArrayVariable = stringVariable.Split(' ')

--
HTH,

Kevin Spencer
Microsoft MVP
Software Composer
http://unclechutney.blogspot.com

A watched clock never boils.

"kundan kumar" <ku************@gmail.comwrote in message
news:11*********************@c28g2000cwb.googlegro ups.com...
hi,
i m developing one application in which i have to compare
two documents and collect the word which has the error. for that
purpose i need to break the line into words from the space between the
words.how can i do it.

Oct 1 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Roland Dalmulder | last post by:
Hello all, In my PHP script I put a text file into a string. Part of that string is read, changed and removed. The while loop continuest to extract the next part of the string. This goes all...
10
by: knoak | last post by:
Hi there, I have a form, and i want to prevent words (inserted in a multiline textfield) to become too long. (So my lay-out won't be messed up) How can i detect after submitting if any word...
2
by: michael | last post by:
On my ASP.NET pages, it seems that _after_ any web or user control - an extra (small) line break or space is inserted automatically right after the Control. This is unwanted since it messes up...
6
by: Gary Wessle | last post by:
hi I have a data file with equal number of columns for each row. I need to get the number of rows and columns to allocate a matrix in gsl. getline (in, line) and parse the line for the number of...
20
by: dmurray14 | last post by:
Hey guys, I'm a C++ newbie here - I've messed with VB, but I mostly stick to web languages, so I find C++ to be very confusing at times. Basically, I am trying to import a text file, but I want...
11
by: elrondrules | last post by:
Hi Am pretty new to python and hence this question.. I have file with an output of a process. I need to search this file one line at a time and my pattern is that I am looking for the lines...
5
by: Ciaran | last post by:
Hi Can someone please give me a hand adapting this expression? I need it to add a space into all words longer than 14 characters that are not contained within $result =...
1
by: mccalla | last post by:
Hi all, Tricky question. I know how to remove line break characters and spaces by using the code below: $message =~ s/\n//g; $message =~ s/\s//g;
7
by: jeddiki | last post by:
Hi, I am using a function called htmlwrap() which states that it does NOT add a "<br>" to the 70 character line so that it forces a line wrap. ( the script safely wraps long words without...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.