diff --git a/dotenv.cabal b/dotenv.cabal
--- a/dotenv.cabal
+++ b/dotenv.cabal
@@ -1,5 +1,5 @@
 name:                dotenv
-version:             0.1.0.2
+version:             0.1.0.3
 synopsis:            Loads environment variables from dotenv files
 
 description:
diff --git a/src/Configuration/Dotenv/Parse.hs b/src/Configuration/Dotenv/Parse.hs
--- a/src/Configuration/Dotenv/Parse.hs
+++ b/src/Configuration/Dotenv/Parse.hs
@@ -1,66 +1,63 @@
 module Configuration.Dotenv.Parse (configParser) where
 
-import Data.Maybe (catMaybes)
-import Text.Parsec.String (Parser)
-import Text.ParserCombinators.Parsec.Prim (GenParser)
-import Text.ParserCombinators.Parsec.Char (space, newline, oneOf, noneOf)
-import Control.Monad (liftM2)
+import Text.Parsec ((<|>), anyChar, char, many, manyTill, try)
 import Text.Parsec.Combinator (eof)
-import Control.Applicative ((<*), (*>), (<$>))
-import Text.Parsec
-  ((<|>), many, try, lookAhead, manyTill, char, anyChar, many1)
+import Text.Parsec.String (Parser)
+import Text.ParserCombinators.Parsec.Char
+  (digit, letter, newline, noneOf, oneOf)
 
+import Control.Applicative ((<*), (*>), (<$>))
+import Data.Maybe (catMaybes)
+import Control.Monad (liftM2)
 
--- | Returns a parser for a Dotenv configuration file.
--- Accepts key and value arguments separated by "=".
--- Comments are allowed on lines by themselves and on
--- blank lines.
+-- | Returns a parser for a Dotenv configuration file.  Accepts key
+-- and value arguments separated by "=".  Comments are allowed on
+-- lines by themselves and on blank lines.
 configParser :: Parser [(String, String)]
-configParser = catMaybes <$> many lineWithArguments
+configParser = catMaybes <$> many envLine <* eof
 
 
-lineWithArguments :: Parser (Maybe (String, String))
-lineWithArguments =
-  comment *> return Nothing
-  <|> newline *> return Nothing
-  <|> many1 (oneOf "\t ") *> return Nothing
-  <|> Just <$> configurationOptionWithArguments
+envLine :: Parser (Maybe (String, String))
+envLine = (comment <|> blankLine) *> return Nothing <|> Just <$> optionLine
 
-configurationOptionWithArguments :: Parser (String, String)
-configurationOptionWithArguments = liftM2 (,)
-  (many space *> manyTill1 (noneOf "\n ") keywordArgSeparator)
+blankLine :: Parser String
+blankLine = many verticalSpace <* newline
+
+optionLine :: Parser (String, String)
+optionLine = liftM2 (,)
+  (many verticalSpace *> variableName <* keywordArgSeparator)
   argumentParser
 
+-- | Variables must start with a letter or underscore, and may contain
+-- letters, digits or '_' character after the first character.
+variableName :: Parser String
+variableName =
+  liftM2 (:) (letter <|> char '_') (many (letter <|> char '_' <|> digit))
+
 argumentParser :: Parser String
 argumentParser = quotedArgument <|> unquotedArgument
 
+quotedArgument :: Parser String
+quotedArgument = quotedWith '\'' <|> quotedWith '\"'
+
+unquotedArgument :: Parser String
+unquotedArgument =
+  manyTill anyChar (comment <|> many verticalSpace <* endOfLineOrInput)
+
 -- | Based on a commented-string parser in:
 -- http://hub.darcs.net/navilan/XMonadTasks/raw/Data/Config/Lexer.hs
 quotedWith :: Char -> Parser String
-quotedWith c =
-  char c *> many chr <* char c
+quotedWith c = char c *> many chr <* char c
 
   where chr = esc <|> noneOf [c]
         esc = escape *> char c
 
-quotedArgument :: Parser String
-quotedArgument = quotedWith '\'' <|> quotedWith '\"'
-
-unquotedArgument :: Parser String
-unquotedArgument =
-  many (noneOf " \t\n#") <* (comment <|> try verticalSpace *> return ()
-                             <|> lookAhead (try endOfLineOrInput))
-
-comment :: Parser ()
+comment :: Parser String
 comment = try (many verticalSpace *> char '#')
           *> manyTill anyChar endOfLineOrInput
-          *> return ()
 
 endOfLineOrInput :: Parser ()
 endOfLineOrInput = newline *> return () <|> eof
-
-manyTill1 :: GenParser tok st a -> GenParser tok st end -> GenParser tok st [a]
-manyTill1 p end = liftM2 (:) p (manyTill p end)
 
 keywordArgSeparator :: Parser ()
 keywordArgSeparator =
