Results 1 to 5 of 5

Thread: Parse(String.Format)

  1. #1

    Thread Starter
    Hyperactive Member BramVandenbon's Avatar
    Join Date
    Jan 2002
    Location
    Belgium
    Posts
    502

    Parse(String.Format)

    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.
    ____________________________________________

    Please rate my messages. Thank you!
    ____________________________________________
    Bram Vandenbon
    http://www.bramvandenbon.com

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083

    Re: Parse(String.Format)

    I think it's only one way function ....nice blog there btw

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Parse(String.Format)

    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.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  4. #4

    Thread Starter
    Hyperactive Member BramVandenbon's Avatar
    Join Date
    Jan 2002
    Location
    Belgium
    Posts
    502

    Re: Parse(String.Format)

    Quote Originally Posted by Pirate
    I think it's only one way function
    Too bad, isn't it ? Would have been cool to do it both ways .


    Quote Originally Posted by Pirate
    ....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
    ____________________________________________

    Please rate my messages. Thank you!
    ____________________________________________
    Bram Vandenbon
    http://www.bramvandenbon.com

  5. #5
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Nice dude...Good luck

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width