It might not matter in your case, but this will only catch comments that start and end on the same line, as the '.' does not match the newlines.
You can try these:
$question =~ s/\*.*?\*//sg; # the s modifier causes . to match newlinesor
question =~ s/\*[^*]*\*//sg; # [^*] matches the newlines tooUpdate: added a * in the second regexp (thanks swiftone) and removed the (), you don't need to capture the comments.
In reply to Re: Re: Remove comments between delimiters
by mirod
in thread Remove comments between delimiters
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |