How to remove multi-line comments from php files using regular expressions? I tried "/\*(.*\n)*\*/" but it fails. Everything he does starts with "/ *" and stops when "* /" last appears.
Thanks to the comments of tenub.
The final solution for all php comments is as follows:
/\*[\s\S]*?\*/|(?<!http:)//.*
Where
1) /\*[\s\S]*?\*/for/*comments*/
/\*[\s\S]*?\*/
/*comments*/
2) (?<!http:)//.* //comment URL-, http:// ( , " ', )
(?<!http:)//.*
//comment
http://
"
'
, tenub, . . ty)
Source: https://habr.com/ru/post/1534702/More articles:Изменение цвета звезд и отображение половины звездного рейтинга с помощью AngularUI Star Rating - angularjsPython regex validation using py.test - pythonSed - Replace the nearest next line / word following a specific pattern - unixClang дает очень разную производительность для выражений, которые интуитивно должны быть эквивалентными - c++Unable to change site visibility in Wordpress - search-engineTypical installation: JDK is not installed or not found, even if they are javaCan XML have a "double array", for example, does it have a "string array"? (Android) - javaAre there any tripartite data binding structures between the DOM, JavaScript, and the server database for AngularJS and Django? - javascripthttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1534706/best-practice-on-forming-links-to-mvc-controlleractions&usg=ALkJrhjy1Xk6FILDbrtrrVo8Qwo4385i2QFind the string using the regular expression and reuse the specified string with the new surrounding text - javascriptAll Articles