Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Can't find list of metacharacters

by Kenosis (Priest)
on Oct 05, 2014 at 19:51 UTC ( [id://1102883]=note: print w/replies, xml ) Need Help??


in reply to Can't find list of metacharacters

Consider the following:

use strict; use warnings; local $_ = q{<>^}; for my $i (qw(<> >^)) { /\Q$i/p and print "${^MATCH}\n"; }

Output:

<> >^

Remember that "^" can also be used to negate a class match in addition to denoting a match at the beginning of a line, e.g., /^[^aeiou]/i (no vowels at the beginning of a line). Both "<" and ">" are metacharacters. See this Extended regex sequences section.

Hope this helps!

Replies are listed 'Best First'.
Re^2: Can't find list of metacharacters
by rsFalse (Chaplain) on Oct 05, 2014 at 20:15 UTC
    Thanks

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1102883]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (2)
As of 2024-04-19 19:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found