Chris Devers wrote:
On Tue, 3 May 2005, John W. Krahn wrote:
On Tue, 3 May 2005, Greg Sheridan wrote:
$dose_density =~ s/[A-Za-z\/ ]//g;
The slash is not a "metacharacter". It has to be escaped because the
substitution operator is using a slash as the delimiter. If you
change the delimiter to another character then it does not have to be
escaped.
Sorry, I was taking "metacharacter" to mean, in this case, "any
character with special meaning in the current context".
If that doesn't describe the slash when slashes are usesd as the regex
delimiter, then what would you call it? If that doesn't describe the
metacharacter-esque behavior here, then what does?
I still think "metacharacter" is the right term here.
You are (somewhat) correct sir! First, there is no such thing as a "regex
delimiter". The delimiter belongs to the match (m//), substitution (s///),
transliteration (tr/// or y///), etc. (q//, qq//, qr//, qx//) operators.
Second, in the context of a character class it would be metacharacter.
The documentation contains lists of quoted, regular expression and character
class metacharacters.
perldoc perlop
perldoc perlre
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>