Discussion: input question
Afficher un message
Vieux 16/09/2007, 03h08   #1
John Joyce
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut input question

I must have forgotten something dreadfully simple.
How do I limit input (from stdin in this case) so that the first non
AlphaNumeric ends input?
I fiddled with gets and with $/ to no avail.
I know I could do input validation later, and I could (should)
normally use buffered input.
gets uses the default \n to end input.
I'd like to end it at the first non-alpha-numeric.
(Ideally, eventually a language specific version would be beautiful
to handle unicode codepoint ranges similarly)

Any ideas?
Or a method that I'm just missing?

  Réponse avec citation
 
Page generated in 0,04642 seconds with 9 queries