473,395 Members | 1,763 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,395 software developers and data experts.

Getting information out of a string

Hi!

I need help getting some information out of a text string.
The text string contains different id-numbers together with a minute
specification.
Example:
Textstring = "125(58),254(65),302(69),324(79)"

Now, the numbers 125, 254, 302, 324 are id-numbers of player names.
The numbers within () is which minute the player (id in front of it)
made a certain action.

Can I in some way loop this and add it to my database?

I have added it without looping but itīs a lot of writing and it would
be good to have it more automated.

Can anyone help me?
Jul 21 '05 #1
1 1151
Thomas wrote:
Hi!

I need help getting some information out of a text string.
The text string contains different id-numbers together with a minute
specification.
Example:
Textstring = "125(58),254(65),302(69),324(79)"

Now, the numbers 125, 254, 302, 324 are id-numbers of player names.
The numbers within () is which minute the player (id in front of it)
made a certain action.

Can I in some way loop this and add it to my database?

I have added it without looping but itīs a lot of writing and it would
be good to have it more automated.

Can anyone help me?


dim arPlayers,arPlayer,iID, iMinutes, i

arPlayers=split(textstring,",")
for i = 0 to ubound(arPlayers)
arPlayer = split(arPlayers(i),"(")
iID = CInt(arPlayer(0)
iMinutes=CInt(Left(arPlayer(1),len(arPlayer(1)) - 1))
'insert the id and minutes into your database here
next

HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 21 '05 #2

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

Similar topics

1
by: ru | last post by:
Hello, I'm trying to parse a rss 1.0 docoment like the following example from http://www.instapundit.com: <?xml version="1.0" encoding="iso-8859-1" ?> - <rdf:RDF...
3
by: Ilja Booij | last post by:
Hi all, I have some trouble with the following: I'm getting a time string, in YYYY-MM-DD HH:mm:ss format, which I need to translate into a string with DD-Mon-YYYY HH:mm:ss +HHMM, where the...
5
by: Brian Henry | last post by:
I have a page which reads an article from the database it has 1 text box, 2 dropdown lists, and a longreat HTML text box. I load the information from the database when the page is set to edit mode...
3
by: Hitesh | last post by:
Hi, I am getting the response from another Website by using the HttpHandler in my current site. I am getting the page but all the images on that page are not appearing only placeholder are...
8
by: Brent White | last post by:
If you need more information, I'd be glad to give it, but I am developing an ASPX page so that the user can select multiple values for a specific field, then pass them on (using Crystal Reports 10...
43
by: chookeater | last post by:
Hi All. My introduction to VB was through VB.Net but I am working with a lot of code that was written by programmers with pre-dotnet experience. As a result there are lots of function calls and...
8
by: R. Bernstein | last post by:
In doing the extension to the python debugger which I have here: http://sourceforge.net/project/showfiles.php?group_id=61395&package_id=175827 I came across one little thing that it would be nice...
1
by: thangchan | last post by:
Hi all, i am getting SQL update problem. as below ======================error messages ======================= Server Error in '/CMS' Application....
4
by: jehugaleahsa | last post by:
Hello: Say I were to query the schema tables from a database management system. Say I got a DataType field that held the string 'VARCHAR2'. Now, I know that VARCHAR2 associates to System.String....
3
by: ArmageddonAsh | last post by:
I'm trying to make an application that will allow the user to enter data into a flexgrid (that's done) and then save the data from that flexgrid into a CSV file but even though the file is made none...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...
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...

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.