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

Split a string in to several parts

250 100+
I want to split the following string.This is the exact format.
start56.23 29-07-2008 16:10 1Stop775632145231234

1part-56.23
2part-29-07-2008 16:10
3part-1
4part-775632145

How can i split these four part at once. Can I use explode or split to do that? or Is there any way? Could someone help me?
Aug 5 '08 #1
2 1212
r035198x
13,262 8TB
Will the string always have the exact same number of characters? In which case taking substrings is probably best.
If not (as is likely) then can you describe more what each part is.
e.g First part will be a number with 2 decimal places followed by a space followed by a date followed by a space e.t.c
Aug 5 '08 #2
hi...
its according to ur need in which way ur splitting ur string ....

if ur spltting based on number of characters like 4 character string or 5 character string then use str_split() function....

if ur splitting it with some special case like space or : or , or- or_ etc.... the use
explode() function.....

but this both function work good when its used with comman separators or comman size if both of them varry's then u will not get the desired result....
Aug 6 '08 #3

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

Similar topics

4
by: Roshawn | last post by:
Hi, I am retrieving a list of book titles from a web service. What I'd like to do is shorten the titles, if possible. For example, there is a book titled "Malicious Mobile Code: Virus...
14
by: Ron | last post by:
Hello, I am trying to parse a string on the newline char. I guess vbCrLf is a string constant. How can I parse my string - data - on the newline char? .... data += ASCII.GetString(buffer, 0,...
9
by: needin4mation | last post by:
Hi, I am trying to parse a colon delimited text file. Assume these as examples: Book:mybook Video:myvideo Name:myname When I use this:
4
by: Michele Petrazzo | last post by:
Hello ng, I don't understand why split (string split) doesn't work with the same method if I can't pass values or if I pass a whitespace value: >>> "".split() >>> "".split(" ") But into...
13
by: Chaim Krause | last post by:
I am unable to figure out why the first two statements work as I expect them to and the next two do not. Namely, the first two spit the sentence into its component words, while the latter two...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.