Guest User

Untitled

a guest
Jan 18th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. def get_date(prompt="What is the date of the last scan (YYYYMMDD)")
  2. new_regex = /A[0-9]{4}[0-1][0-9][0-3][0-9]z/
  3. print prompt
  4. gets.chomp
  5. if prompt != new_regex
  6. puts "Please enter the date in the correct format"
  7. print prompt
  8. gets.chomp
  9. end
  10. end
Add Comment
Please, Sign In to add comment