V
Vito Corleone
Hi,
How can I escape + sign from regex? I want to change:
C++ to <b>C++</b>
Here is what I did:
#!/usr/bin/perl
$text = "C++";
$source = "Perl c++ c-- Java C-- C++";
$source =~ s#$text#<b>$text</b>#ig;
print $source . "\n";
[bk@wolverine bk]$ ./test.pl
Nested quantifiers in regex; marked by <-- HERE in m/C++ <-- HERE / at
../test.pl line 4.
How can I do that? Plese help.
--Vito
How can I escape + sign from regex? I want to change:
C++ to <b>C++</b>
Here is what I did:
#!/usr/bin/perl
$text = "C++";
$source = "Perl c++ c-- Java C-- C++";
$source =~ s#$text#<b>$text</b>#ig;
print $source . "\n";
[bk@wolverine bk]$ ./test.pl
Nested quantifiers in regex; marked by <-- HERE in m/C++ <-- HERE / at
../test.pl line 4.
How can I do that? Plese help.
--Vito