-
June 1st, 2006, 01:09 PM
#1
Simple string split problem
Hallo guys,
I have string like a html tags , which has many attributes , I want to seperate each of them
code:
<Configuration Name="Release|Win32" OutputDirectory="Release " IntermediateDirectory="../../../../output.tmp/Release/CacheTest/" ConfigurationType="1" CharacterSet="2">
I used strstr and strtok functions to seperate it using the white spaces , but its useless, as some of the values in quotes have whitespaces too.
Looking forward to your reply guys.
mfg,
kings
kings4u
-
June 1st, 2006, 01:40 PM
#2
Re: Simple string split problem
Looks like a quote followed by a space is your field delimiter.
-
June 1st, 2006, 04:17 PM
#3
Re: Simple string split problem
seems to me the solution is a bit of brute force: incrementally go throught the target string but keep a flag that indicates whether you have an unbalanced quote at any point in time. the idea is that white space will not constitute the end of a token being built if the quotes are unbalanced.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|