|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Parsing strings to objects (techniques)I need to parse a command-line string and transform results in some objects. For sample: myapp.exe /param1="textwith""quotes" /param2=other text /param3=123 ...will become: objParam("param1").Value = "textwith""quotes" objParam("param2").Value = "other text" objParam("param3").Value = "123" Note the double quotes in the text. I need to recognize that as a simple quote, like SQL do. What I really need is about techniques or a specific class for do that work, because that string can be huge and very complicated, according the context. Any suggestion? Cesar Cesar Ronchese wrote:
Show quoteHide quote > Hi All. Read up in the MSDN on Regular Expressions (all the stuff in the> > I need to parse a command-line string and transform results in some objects. > For sample: > > myapp.exe /param1="textwith""quotes" /param2=other text /param3=123 > ...will become: > objParam("param1").Value = "textwith""quotes" > objParam("param2").Value = "other text" > objParam("param3").Value = "123" > > Note the double quotes in the text. I need to recognize that as a simple > quote, like SQL do. > > What I really need is about techniques or a specific class for do that work, > because that string can be huge and very complicated, according the context. namespace System.Text.RegularExpressions). Feel free to come back with more specific questions :) -- Larry Lard Replies to group please |
|||||||||||||||||||||||