PDA

Click to See Complete Forum and Search --> : Parse(String.Format)


BramVandenbon
Oct 19th, 2006, 08:28 AM
Hi

as most of you know, you can use formats when building strings
example:

strResult = String.Format("blablabla {0} blablabla {1} blablabla", input0, input1);

I was wondering if there is a default function to parse it back the other way round:
string[] inputs = ReParse(strResult, "blablabla {0} blablabla {1} blablabla");

(If not, then I guess the cleanest way is a regular expression :()

Thank you in advance.

Pirate
Oct 23rd, 2006, 12:20 AM
I think it's only one way function ....nice blog there btw ;)

jmcilhinney
Oct 23rd, 2006, 12:28 AM
You may be able to come up with something that did that using regular expressions but it would require more than one line of code on your part to accomplish it.

BramVandenbon
Oct 23rd, 2006, 12:41 PM
I think it's only one way function
Too bad, isn't it ? :( Would have been cool to do it both ways :).


....nice blog there btw ;)
Thanks :) The antwars project has been down for longer than a month though :(.

I am working on a project for school now (my masterproject). I was supposed to do my masterproject in the field of OpenGL. And I had fully prepared myself for it. But the business that was supporting me in this, changed their minds. My current project is a video annotation tool to test the correctness of traffic statistics which are automatically generated by videocamera-modules which are positioned in tunnels and along roads. Also a pretty cool project :)

But I am planning to continue the antwars project in about half a year from now, or maybe earlier when I find the time. There is really a lot of interest in the project. I am not advertising or anything. But I get about 10 visitors on that blog every day, most of them were searching for "antwars" in google. I think this proves the concept in itself is something people are waiting for.

Lol, this reply is running out of hands :) Too long again :p

Pirate
Oct 23rd, 2006, 11:23 PM
Nice dude...Good luck :)