Between-func
This function extracts a substring using begin and end strings or characters.
string Between(string str$, string str1$, string str2$)$
str
str1, str2
Returns the string contents after str1 and before str2. Returns an empty string if any of str, str1 or str2 are not found.
EX1
string strIn$=[Results]"March 2009"!"Average Return"[1:31]; string strOut$ = Between(strIn$,"[","]")$; // strOut is Results string strOut$ = Between(strIn$,"]","!")$; // strOut is "March 2009" string strOut$ = Between(strIn$,"!","[")$; // strOut is "Average Return"
EX2
string strIn$=[Graph1]1!2"W2P3_200um_multicycle_Measurement2.dat"; string strOut$=Between(strIn$,char(34)$,char(34)$)$; // strOut is W2P3_200um_multicycle_Measurement2.dat
Mid Search Find Left Right