How to parse a command line with regular expressions?

后端 未结 13 682
离开以前
离开以前 2020-12-03 16:02

I want to split a command line like string in single string parameters. How look the regular expression for it. The problem are that the parameters can be quoted. For exampl

13条回答
  •  醉梦人生
    2020-12-03 16:16

    I tend to use regexlib for this kind of problem. If you go to: http://regexlib.com/ and search for "command line" you'll find three results which look like they are trying to solve this or similar problems - should be a good start.

    This may work: http://regexlib.com/Search.aspx?k=command+line&c=-1&m=-1&ps=20

提交回复
热议问题