Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def get_date(prompt="What is the date of the last scan (YYYYMMDD)")
- new_regex = /A[0-9]{4}[0-1][0-9][0-3][0-9]z/
- print prompt
- gets.chomp
- if prompt != new_regex
- puts "Please enter the date in the correct format"
- print prompt
- gets.chomp
- end
- end
Add Comment
Please, Sign In to add comment