Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Can't find list of metacharacters

by Kenosis (Priest)
on Oct 05, 2014 at 19:51 UTC ( #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 (Hermit) on Oct 05, 2014 at 20:15 UTC
    Thanks

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2021-03-02 07:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (40 votes). Check out past polls.

    Notices?