in reply to die on carriage return
How do you read the user's input? Is it a command line or a network tool, is it a GUI tool (TK, Gtk)?
As \D includes all non-numerical characters, the newlines [\r\n] should already be included in that.
I would avoid sequences like ^M and use \r and/or \n instead for newlines (or the real hex-values).
|
|---|