Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^2: Matching a pattern in Regex

by Ieronim (Friar)
on Jul 25, 2006 at 10:40 UTC ( [id://563472]=note: print w/replies, xml ) Need Help??


in reply to Re: Matching a pattern in Regex
in thread Matching a pattern in Regex

There is IMHO no sense in the 'if' condition in your snippet :) Or do i miss something?

     s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print

Replies are listed 'Best First'.
Re^3: Matching a pattern in Regex
by davorg (Chancellor) on Jul 25, 2006 at 10:45 UTC

    Well, it was there (albeit in a more complex form) in the original code, so I thought I'd simplify it but leave it there.

    If there's a lot of text and substitutions are only carried out on a small number of lines, then it's probably worth doing a simple check like this - but I'd almost certainly leave it out if I was writing this code from scratch.

    As in all cases, the only sure way to know if it's useful is to benchmark the options with something similar to the real data.

    --
    <http://dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2024-04-25 11:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found