I have the following string:
[assembly: AssemblyVersion("1.0.0.0")]
The issue now is that I have to extract the 1.0.0.0
out. Here's the regular expression that I can come out with:
var pattern = "[^\\/]+\\[[a-z]+:\\s" + "AssemblyVersion"+ "(?:Attribute)?\\((.+)\\)\\]" ;
var theString ="[assembly: AssemblyVersion("1.0.0.0")]";
var reAssemblyVersion = new RegExp(pattern,"m");
reAssemblyVersion.exec(theString);
var theAnswer = RegExp.$1; // theAnswer is "1.0.0.0", but I want it to be 1.0.0.0
There must be something I did wrong in setting up the pattern
variable, but couldn't find out.. any ideas?