脚本文件内容是
//{input: x(width),y(height);
//output: z(area);}
function(x,y)
z=x*y
我只需要阅读这些行。花括号中数据的正则表达式是什么
//{input: x(width),y(height);
//output: z(area);}
我尝试了以下
Dim sr As StreamReader = New StreamReader(scriptpath)
' Dim textToParse As String
Dim scriptText As String
scriptText = sr.ReadToEnd
Dim extractCommentRegex As New Regex("\/\/\{(.*?)\}")
Dim textToParse As Match = extractCommentRegex.Match(scriptText)