VB String Parsing

Started by
1 comment, last by Synex 20 years, 4 months ago
Hi there... I''m having problems parsing some strings from data I''ve extracted from a game, I was wondering with all of the extreme programming know-how demonstrated in these very l337 forums if anyone has any suggestions. The string I''m trying to parse would be something like: data blah blah blah... [ 9612, 77, ''Inductive Ballistic Screen Augmentation II'', ''Boosts shield resistance against kinetic damage.'', 1045, 0.0, 10000.0, 5.0, 0.0, 1, 2, 19800, 0, None, 0.059999999999999998], [ 9616, 77, " ''Consecrated'' III EM Ward Reinforcement ", ''Boosts shield, armor and structure resistance against EM damage.'', 1045, 0.0, 10000.0, 5.0, 0.0, 1, 4, 61976, 0, None, 0.070000000000000007], data blah blah blah... The problem I''m having is the enclosed sets of quotes and extra comma''s inside each rowset... I''ve tried splitting by '','' or '', '' but both cause problems because of the different types of data (eg integers don''t have surrounding '''') + (Strings with ''s in them have "" instead of '''' ) Any suggestions would be greatly appreciated! Cheers, Synex l337 programming dude
SynexCode Monkey
Advertisement
I don't think there's an easy solution here - if anything ' & vbnewline might work, unless it was you who broke them down in lines
otherwise, you're probably going to have to replace the ,s for some other symbol while they are between ''s



"I woke up sweating and clutching my pillow. Thankfully the powerful and reassuring visage of Optimus Prime staring back at me from my pillow case served to ease my frayed nerves. Like the giant robotic father I never had he always knows just what to say" - Gabe, Penny-Arcade

Alexandre Moura

[edited by - alexmoura on December 12, 2003 10:16:24 PM]
Yar... tis an ultimate pain in the pansy eh?

I''ve figured out a way to do it taking each line as a value and stripping off the tags... that''s been working, but now I''ve found another foramt where some data-rows are stored on one line and other on multiple lines like above...

What a pain!! ARGH!
SynexCode Monkey

This topic is closed to new replies.

Advertisement