Permalink
Browse files

fixed regex

  • Loading branch information...
1 parent c4f864f commit 98bc1290f6e1d85a7c393572c414b861527d92f4 @emchristiansen committed Jan 15, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/main/scala/benchmark_util.scala
@@ -19,7 +19,7 @@ object BenchmarkUtil {
// Ignore empty lines.
val lines = Resource.fromFile(path).lines().filter(_.size > 0).toList
- val Pattern = """[^ \t\n,]+[0-9\.]+[$ \t\n,]+""".r
+ val Pattern = """(^|[ ,\t\n]+)([0-9\.]+)($|[ ,\t\n]+)""".r
val data = for (line <- lines) yield {
val list = for (number <- Pattern.findAllIn(line)) yield number.toDouble
list.toIndexedSeq

0 comments on commit 98bc129

Please sign in to comment.