re-internal.rb
changeset 93 4794759139ea
parent 92 e85600529ca5
child 94 9ea667baf097
--- a/re-internal.rb	Sat Jun 15 09:11:11 2013 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-# provided by Daniel Baldwin
-
-nums = (1..100)
-
-#iterate through the nums 1-100
-nums.each do |i|
-
-	start_time = Time.now
-	string = "a" * i
-
-	#create a new regular expression based on current value of i
-	re = Regexp.new(/((a?){#{i}})(a{#{i}})/)
-
-        re.match(string)
-	#if re.match(string)
-	#	puts "matched string  a * #{i} with regex #{re}"
-	#else
-	#	puts "unmatched string a * #{i} with regex #{re}"
-	#end
-	
-  puts "#{i} %.5f" % (Time.now - start_time)
-end