Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: Parsing semi-erratic text

by SamCG (Hermit)
on Aug 23, 2006 at 19:50 UTC ( #569196=note: print w/replies, xml ) Need Help??

in reply to Re: Parsing semi-erratic text
in thread Parsing semi-erratic text

Hrmm...perhaps an effect of my cutting and pasting? The body of my email gets read into a variable (so it's like slurping a file). I can't seem to split on newlines, and if I use a regex to count I get only one in each email (which I presume is at the end).

Thank you for the implicit character class ([^:]) suggestion, by the way. I hate putting .* into regexes, even with the non-greedy modifier.

s''limp';@p=split '!','n!h!p!';s,m,s,;$s=y;$c=slice @p1;so brutally;d;$n=reverse;$c=$s**$#p;print(''.$c^chop($n))while($c/=$#p)>=1;

Replies are listed 'Best First'.
Re^3: Parsing semi-erratic text
by ikegami (Patriarch) on Aug 23, 2006 at 20:04 UTC
    I agree. .* and .*? usually/often assume the data is formatted correctly.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2023-02-08 19:37 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (43 votes). Check out past polls.