Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^2: regex anchoring issue

by BillKSmith (Curate)
on Feb 15, 2013 at 14:01 UTC ( #1018894=note: print w/ replies, xml ) Need Help??

in reply to Re: regex anchoring issue
in thread regex anchoring issue

Refer to charnames for a neat way to code the value of your $soh_string.

use charnames qw(:full); $soh_string = "\N{SOH}";

Comment on Re^2: regex anchoring issue
Download Code
Replies are listed 'Best First'.
Re^3: regex anchoring issue
by kcott (Canon) on Feb 16, 2013 at 06:35 UTC

    Thanks, Bill. I had considered that but decided not to use it due to the ambiguity I noted in my opening paragraph. Had penguin-attack wanted the single ASCII character SOH, instead of the string '<SOH>', that was covered by Ctrl-A (also noted).

    [Side issue (struggling not to appear grossly pedantic): the charnames pragma has been distributed with Perl since at least v5.8.8 - the perldoc link (charnames) would provide the most recent documentation.]

    -- Ken

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (10)
As of 2016-02-08 22:10 GMT
Find Nodes?
    Voting Booth?

    How many photographs, souvenirs, artworks, trophies or other decorative objects are displayed in your home?

    Results (286 votes), past polls