E1M1 Posted April 15, 2012 Share Posted April 15, 2012 (edited) After over half hour puzzling I cant find way to match multi line comment in php. My code ($commentblock) works fine with single line block comment but CRLF breaks it. Could anyone tell me how I could fix it?Comment example:/*blahblahblah*/#include <array.au3> FileGetFunctionCallTips("funcs.php") Func FileGetFunctionCallTips($file) $contents = FileRead($file) $quote = '"' $function = "rnfunctionh+w+(?:s|s?)((?:[ a-zA-Z0-9.,$'"&$quote&"=]+|[ a-zA-Z0-9.,$'"&$quote&"=])?)" $singlelinecomment = "rn//(?:.)+" $commentblock = "rn/*(?:.*|rn)*/" $matches = StringRegExp ( $contents, $commentblock ,3) _ArrayDisplay($matches) EndFuncThanks in advance.From Internet i foun"rn/*[^*]**+(?:[^*/][^*]**+)*/" but i dont get it why my original algorithm didn't work. Edited April 15, 2012 by E1M1 edited Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now