Strip block comments: Difference between revisions

PascalABC.NET
m (→‎{{header|Wren}}: Changed to Wren S/H)
(PascalABC.NET)
 
Line 1,935:
function something() {
}</pre>
 
=={{header|PascalABC.NET}}==
<syntaxhighlight lang="delphi">
begin
var s := '''
/**
* Some comments
* longer comments here that we can parse.
*
* Rahoo
*/
function subroutine() {
a = /* inline comment */ b + c ;
}
/*/ <-- tricky comments */
/**
* Another comment.
*/
function something() {
}
''';
Regex.Replace(s,'/\*(\n|\r|\r\n|.)*?\*/','').Print
end.
</syntaxhighlight>
{{out}}
<pre>
 
function subroutine() {
a = b + c ;
}
function something() {
}
</pre>
 
 
=={{header|Perl}}==
222

edits