I just started tinkering with Ruby earlier this week and I\'ve run into something that I don\'t quite know how to code. I\'m converting a scanner that was written in Java into R
The simplest way would be to use a Regular Expression:
def numeric?(lookAhead) lookAhead =~ /[0-9]/ end def letter?(lookAhead) lookAhead =~ /[A-Za-z]/ end