Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^2: regex help please

by chargrill (Parson)
on Oct 27, 2006 at 18:49 UTC ( [id://580992]=note: print w/replies, xml ) Need Help??


in reply to Re: regex help please
in thread regex help please

-- for useless use of capturing parens, and also for backslashing < and >

I'm also thinking there's something the OP left out of the specification, because of the stipulation about "must match the first but not the second", so your solution is likely incomplete.



--chargrill
s**lil*; $*=join'',sort split q**; s;.*;grr; &&s+(.(.)).+$2$1+; $; = qq-$_-;s,.*,ahc,;$,.=chop for split q,,,reverse;print for($,,$;,$*,$/)

Replies are listed 'Best First'.
Re^3: regex help please
by Anonymous Monk on Oct 27, 2006 at 19:17 UTC
    Good call...this might do the trick (assuming Roxy is static)

    while(<DATA>) { chomp; $_ =~ s/rcvtime.*<0a>// unless /Roxy/; print "$_\n";; } __DATA__ rcvtime=2006102600322813316-sndtime=2006102600323042116-msgtext=FRM\3a +Matd<0a> rcvtime=2006102611373625516-sndtime=2006102611373640716-msgtext=FRM\3a +Roxy<0a>

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2024-04-19 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found