c# - create a regular expression of a specific sentence -


i using constraint file system , using line parsing values:

angle(vector(jointa,jointb),vector(jointa,jointb),minvalue,maxvalue)

can please me , specify regular expression of line. want able retrieve names of 4 joints, including minvalue maxvalue. thanks!

if you're asking way parse variable bits kind of text, it's quite easy:

see here: http://tinyurl.com/qjdaj9w

var exp = new regex(@"angle\(vector\((.*?),(.*?)\),vector\((.*?),(.*?)\),(.*?),(.*?)\)");  var match = exp.match("angle(vector(jointa,jointb),vector(jointa,jointb),minvalue,maxvalue)");   var jointa1 = match.groups[0]; var jointb1 = match.groups[1]; var jointa2 = match.groups[2]; var jointb2 = match.groups[3]; var max     = match.groups[4]; var min     = match.groups[5]; 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -