0
腳本文件的內容就是Regex-匹配每一個在支架包括換行符
//{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)
其不工作 – user2194838