Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: Why doesn't quantifier work with character classes?

by thezip (Vicar)
on Aug 13, 2012 at 22:30 UTC ( #987230=note: print w/replies, xml ) Need Help??


in reply to Re: Why doesn't quantifier work with character classes?
in thread Why doesn't quantifier work with character classes?

Please correct me if I am wrong (or if I misunderstood your statement), but there is nothing in OP's regex that restricts a match to the beginning of a line. Hence, the eight consecutive characters may appear anywhere on a line. Right?


What can be asserted without proof can be dismissed without proof. - Christopher Hitchens, 1949-2011
  • Comment on Re^2: Why doesn't quantifier work with character classes?

Replies are listed 'Best First'.
Re^3: Why doesn't quantifier work with character classes?
by BrowserUk (Pope) on Aug 13, 2012 at 22:53 UTC
    Hence, the eight consecutive characters may appear anywhere on a line. Right?

    Yes, but since the lines that match the character class in question contain only those characters; and a regex will always match as early as possible; that'll be at the beginning of the line in these cases.


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

Re^3: Why doesn't quantifier work with character classes?
by rnaeye (Pilgrim) on Aug 13, 2012 at 22:34 UTC

    Correct!
    "BrowserUk" and "thezip" 's suggestions solved the problem. Thanks.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://987230]
help
Chatterbox?
[Corion]: marto: Yeah, things are more parent-friendly the way they are ;))
[marto]: some hardware/makey thing
[Corion]: marto: Ah, I'm currently drifting to that again, over"painting" (well with Inkscape) one of my photographs and thinking about vectorizing some other images ...
[marto]: Corion, yes something 'artistic', so that or some music. Even combine some things, build a musical instrument :)
[Corion]: marto: Naah, I'm avoiding that rabbit hole ;) Sometimes I think of using Perl to create MIDI to generate music, or at least the harmonies to which I could jam, but then that would eat even more into available time ;-))

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2017-07-27 07:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (404 votes). Check out past polls.