#include <StringConstants.au3> ; to declare the Constants of StringRegExp
#include <Array.au3> ; UDF needed for _ArrayDisplay and _ArrayConcatenate
Local $sRegex = "(?m).*[^'"].*([\/]{2}.*[\r\n|\r|\n]).*[^'"].*"
Local $sString = "" & @CRLF & _
" //get means only read, but not to mutate data" & @CRLF & _
" Get(BooksWithAuthors)" & @CRLF & _
" //default queries via mycel" & @CRLF & _
" .Query()" & @CRLF & _
" //junction table to pair books and authors" & @CRLF & _
" .From(BookAuthor.As(BA))" & @CRLF & _
" //main table for books" & @CRLF & _
" .Join(left: Books.As(B) => B.Id == BA.BookId)" & @CRLF & _
" //main table for authors" & @CRLF & _
" .Join(left: Authors.As(A) => A.Id == BA.AuthorId)" & @CRLF & _
" //groups by column, body allows to restore data (restructuring)" & @CRLF & _
" .GroupBy(B.Id, => { B.Authors.Add(A) })" & @CRLF & _
" //ignore still registerd data objects for the response" & @CRLF & _
" .SelectIgnore(BA)" & @CRLF & _
" //or select only that fields or objects you want to response" & @CRLF & _
" .Select(B)" & @CRLF & _
" .Foo("//wrong-comment-inside-quotes")" & @CRLF & _
" .Foo('//wrong-comment-inside-single-quotes')" & @CRLF & _
" .Foo('some /*wrong-comment*/ inside')" & @CRLF & _
" ;" & @CRLF & _
"" & @CRLF & _
" //get means only read, but not to mutate data" & @CRLF & _
" Get(BooksWithAuthorsByMethod)" & @CRLF & _
" //using individual backside methods (created by own)" & @CRLF & _
" .GetBooksWithAuthors(id:6, filter:{key:'minAuthorAge', value:17})" & @CRLF & _
" ;" & @CRLF & _
"" & @CRLF & _
" /*" & @CRLF & _
" comments" & @CRLF & _
" "over"" & @CRLF & _
" 'multiply" & @CRLF & _
" lines' //with wrong comments inside" & @CRLF & _
" *\" & @CRLF & _
""
Local $aArray = StringRegExp($sString, $sRegex, $STR_REGEXPARRAYGLOBALFULLMATCH)
Local $aFullArray[0]
For $i = 0 To UBound($aArray) -1
_ArrayConcatenate($aFullArray, $aArray[$i])
Next
$aArray = $aFullArray
; 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