> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/programming_tasks/s/strip_block_comments.md).

# Strip block comments

For extra credit, it allows the caller to redefine the delimiters.

```ruby
func strip_block_comments(code, beg='/*', end='*/') {
    var re = Regex(beg.escape + '.*?' + end.escape, 's')
    code.gsub(re, '')
}
 
say strip_block_comments(ARGF.slurp)
```
