c# - String substring or reg expr -
i have got problem getting 3 params console. example user enter console line: '/s:http://asdasd.asd /e:device /f:create'
string params = console.readline(); // /s:http://asdasd.asd /e:device /f:create' i need params
string server = ""; //should "http://asdasd.asd" string entity = ""; //should "device" string function = "" //should "create" i can not understand how it. me please)
example console http://d.pr/i/ktpx
use this:
`(?<=/s:)[^ ]+` `(?<=/e:)[^ ]+` `(?<=/f:)[^ ]+`
Comments
Post a Comment