A
ahjiang
Hi all,
I have a few simple question here
$program = "/*Hello world*/ How are you";
$program =~ s {
/\* # Match the opening delimiter.
.*? # Match a minimal number of characters.
\*/ # Match the closing delimiter.
} []gsx;
Output: How are you
I understand im using the s/PATTERN/REPLACEMENT/egimosx this.
1) Why does the above syntax still works. It doesnt follow s///.
2) \* Match the opening delimiter. The opening delimiter in $program is
/* how come \* still matches it?
Appreciate any help.
I have a few simple question here
$program = "/*Hello world*/ How are you";
$program =~ s {
/\* # Match the opening delimiter.
.*? # Match a minimal number of characters.
\*/ # Match the closing delimiter.
} []gsx;
Output: How are you
I understand im using the s/PATTERN/REPLACEMENT/egimosx this.
1) Why does the above syntax still works. It doesnt follow s///.
2) \* Match the opening delimiter. The opening delimiter in $program is
/* how come \* still matches it?
Appreciate any help.