Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: getting a regex to return an array of matches?

by rmexico (Novice)
on Feb 14, 2006 at 18:16 UTC ( #530187=note: print w/replies, xml ) Need Help??


in reply to Re: getting a regex to return an array of matches?
in thread getting a regex to return an array of matches?

the reason that i'm undef'ing the file terminator, is b/c i'm parsing files that could have lines spanning more than one line, so the normal '\n' isn't applicable
  • Comment on Re^2: getting a regex to return an array of matches?

Replies are listed 'Best First'.
Re^3: getting a regex to return an array of matches?
by Cody Pendant (Prior) on Feb 15, 2006 at 02:54 UTC
    i'm parsing files that could have lines spanning more than one line

    I think a moment's thought will tell you there's a big problem with that statement!

    If you have "lines" which span more than one "line", then you're going to have to define for us what the word "line" means for you -- first at the start of the sentence and then what it means at the end of the sentence.

    To put it another way, perl is happy to let you decide what the end of a line looks like, but you don't appear to know yourself.



    ($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
    =~y~b-v~a-z~s; print

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://530187]
help
Chatterbox?
[holli]: perl 6 is really well thought trough
[holli]: really concise

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2017-09-23 12:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (272 votes). Check out past polls.

    Notices?