I'm creating a console application to scan classic asp pages and do a match on the asp function getcontentdirect("") The code at the bottom is an example of some random snippets of code that I am scanning.
I'm using the following regex - (?<=getContentDirect)([(][^)]*)[)].
I need 2 regex's to find the functions that
a - Finds just : ("Content User") so no ampersands or commas. (the word Content User is a word to be searched in the database and could be anyword)
b - Finds anything that is not that as above so ("OLCINTRO " & obj_Session.GetDetail("CurrentCurriculumID", "0") & "/" & str_Action)
I need to be able to check if the function contains variables or other functions. My above regex finds both.
I'm using http://regexhero.net/tester/ to test my regex.
00165: Response.Write "<div style=""margin-left:2.5%""><span class=""Content1"">" & obj_Content.getContentDirect("Content User") & _
00247: <td><%=obj_Content.GetContentDirect("OLCINTRO " & obj_Session.GetDetail("CurrentCurriculumID", "0") & "/" & str_Action)%></td>
<td><%=obj_Content.GetContentDirect("OLCINTRO " & obj_Session.GetDetail("CurrentCurriculumID", "0") & "/" & str_Action)%></td>
if len(LgSelect(25))=0 then LgSelect(25)= obj_Content.getContentDirect("CONTENT SelectRatee")