473,395 Members | 1,668 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.

Can I use strtok for splitting a string with a certain pattern?

I have a string like "THIS::IS::THE:EXAMPLE::STRING"
I want to split the string to tokens based on "::".

The tokens should be:
THIS
IS
THE:EXAMPLE
EXAMPLE
STRING
Oct 31 '12 #1
1 1847
zmbd
5,501 Expert Mod 4TB
no.
The command uses a single char deliminter
Split a String C++ FAQ
Oct 31 '12 #2

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

Similar topics

2
by: David Pratt | last post by:
I have string text with language text records that looks like this: 'en' | 'the brown cow' | 'fr' | 'la vache brun' Two or more language records can exist in each string (example above shows 2...
1
by: Sugapablo | last post by:
I have a column named "LIST" in a table with strings like the following: 151231-1002-02-1001 151231-1001-02-1001 151231-1002-02-1002 151231-1003-02-1001 etc.... What I'd like to do is...
2
by: Ed Brown | last post by:
I'm working on a VB.Net application that needs to do quite a bit of string pattern matching, and am having problems using the "LIKE" operator to match the same string twice in the pattern. For...
1
by: sadiewms | last post by:
Hello! I have a flat file that I'm trying to get into a relational Access 2003 DB. One of the fields in the flat file has a list of names separated by ";". I'd like to loop through them and...
2
by: bluebeta | last post by:
Hi, I am using embedded visual C++ 4.0 and I want to use function strtok to split string into array. my sample code is as below: ...
7
by: Anat | last post by:
Hi, What regex do I need to split a string, using javascript's split method, into words-array? Splitting accroding to whitespaces only is not enough, I need to split according to whitespace,...
12
by: John | last post by:
Hi I have a multi-line address field which has each line separated by CRLF. How can I split this field into individual strings using crlf as separator? Thanks Regards
13
LucasBishop
by: LucasBishop | last post by:
Hi everyone; i'm working with a program that can't split a strig of characters if i introduce out of the program. It only work's if the string is put it directly in the the soucer code, here it is:...
11
by: Lothar Behrens | last post by:
Hi, I have selected strtok to be used in my string replacement function. But I lost the last token, if there is one. This string would be replaced select "name", "vorname", "userid",...
10
by: CSharper | last post by:
I have a html page that I retrived and stored in a string and I want to split it based on <tdelements. I know only way you can split using string.split is using characters. The other option is...
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
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:
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.