#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?s)^.*?(\S*)\({1}.*?ref\s*SqlConnection"
Local $sString = " public static bool InsertNote(string TableName, string TableKey, string DocType, string InsuredKey, string SubmissionKey," & @CRLF & _
" string Staff, string DefaultAction, string DisplayKey, FileType FileType, string IFSFileName," & @CRLF & _
" string IFSFolder, string IFSTimeStamp, string Subject, string Notation, NoteType NoteType," & @CRLF & _
" //string Company, string NoteCategory, ref OracleConnection Connection)" & @CRLF & _
" string Company, string NoteCategory, string DocumentName, ref SqlConnection Connection)" & @CRLF & _
" {" & @CRLF & _
"}" & @CRLF & _
"" & @CRLF & _
" public static bool InsertNote(string TableName, string TableKey, string DocType, string InsuredKey, string SubmissionKey," & @CRLF & _
" string Staff, string DefaultAction, string DisplayKey, FileType FileType, string IFSFileName," & @CRLF & _
" string IFSFolder, string IFSTimeStamp, string Subject, string Notation, NoteType NoteType," & @CRLF & _
" //string Company, string NoteCategory, ref OracleConnection Connection)" & @CRLF & _
" string Company, string NoteCategory, string DocumentName, ref SqlConnection Connection)" & @CRLF & _
" {" & @CRLF & _
"}"
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYFULLMATCH)
; Present the entire match result
_ArrayDisplay($aArray, "Result")
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for AutoIt, please visit: https://www.autoitscript.com/autoit3/docs/functions/StringRegExp.htm