Permalink
Browse files

Clean up regex

  • Loading branch information...
therubymug committed May 10, 2011
1 parent 49ee9c3 commit 5047f471bee8a8f6d36e9a723f4e578e1578cade
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/hitch/ui.rb
View
@@ -14,7 +14,7 @@ def self.prompt_for_pair(new_author)
highline.say("I don't know who #{new_author} is.")
if highline.agree("Do you want to add #{new_author} to ~/.hitch_pairs?", true)
author_name = highline.ask("What is #{new_author}'s full name?") do |q|
- q.validate = /\A[-(\w|.,)+\s?]+\Z/
+ q.validate = /\A[\w.,-]+(?: [\w.,-]+)*\z/
end
Hitch::Author.add(new_author, author_name)
Hitch::Author.write_file

0 comments on commit 5047f47

Please sign in to comment.