Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Detect STX and ETX hex in received string

by ColonelPanic (Friar)
on Nov 28, 2012 at 09:05 UTC ( [id://1005982]=note: print w/replies, xml ) Need Help??


in reply to Re: Detect STX and ETX hex in received string
in thread Detect STX and ETX hex in received string

This regex would not match anything unless an ETX was found, while the poster wanted to stop reading as soon as 80 bytes were found.

(Apologies; originally this comment contained a typo such that it made no sense)



When's the last time you used duct tape on a duct? --Larry Wall

Replies are listed 'Best First'.
Re^3: Detect STX and ETX hex in received string
by kcott (Archbishop) on Nov 29, 2012 at 05:38 UTC

    I'd say that's a matter of interpretation. I did consider the situation where no ETX existed; however, jagexCoder wrote "... packets of interest that are within STX and ETX endings.". Accordingly, I coded for STX and ETX to always be present. Perhaps wait for the OP to clarify this.

    [Aside: You appear to have removed the original typo, so I don't know what you're apologising for. Regardless, I accept your apology. :-) ]

    Update: Oh dear! Having posted this, I see I've also introduced a typo such that it made no sense.
    s/Perhaps wait for to OP can clarify this./Perhaps wait for the OP to clarify this./

    -- Ken

      Fair enough, I suppose it is a matter of interpretation.


      When's the last time you used duct tape on a duct? --Larry Wall

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-28 11:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found