Last active
December 14, 2015 04:49
Revisions
-
100lp revised this gist
Feb 27, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ def alex(string) if string[/^\d/] 1 elsif string[/123#/] 2 else if string.scan(/1/).size == 1 3 -
100lp revised this gist
Feb 27, 2013 . 1 changed file with 5 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,8 +6,10 @@ def alex(string) else if string.scan(/1/).size == 1 3 elsif string.scan(/1/).size > 1 4 else 0 end end end @@ -16,4 +18,5 @@ def alex(string) puts alex("12345") puts alex("a123#451233") puts alex("a12345") puts alex("a1231451111") puts alex("a2345") -
100lp revised this gist
Feb 27, 2013 . 1 changed file with 5 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,21 +1,19 @@ def alex(string) if string[/^\d/] 1 elsif string[/123#/] 555 else if string.scan(/1/).size == 1 3 else 4 end end end puts alex("12345") puts alex("a123#451233") puts alex("a12345") puts alex("a11234511") -
100lp revised this gist
Feb 25, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ def alex(string) if string[/^\d/] 1 elsif string[/123#)/] 555 else if string[/1{1}/] -
100lp revised this gist
Feb 25, 2013 . 1 changed file with 6 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,17 +3,19 @@ def alex(string) 1 elsif string[/(123#)/] 555 else if string[/1{1}/] 3 elsif string[/1{2,}/] 4 else 00 end end end puts alex("12345") puts alex("a123#45") puts alex("a112345") puts alex("a11234511") -
100lp revised this gist
Feb 25, 2013 . 1 changed file with 11 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,17 +1,19 @@ def alex(string) if string[/^\d/] 1 elsif string[/(123#)/] 555 if string[/1{1}/] 3 elsif string[/1{2,}/] 4 else 00 end else 0 end end puts alex("aa123jsh11fskjh24324r3") -
100lp revised this gist
Feb 25, 2013 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,8 @@ def alex(string) 555 if string[/1/] 4 else 3 end else 0 -
100lp revised this gist
Feb 25, 2013 . 1 changed file with 10 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,17 @@ def alex(string) if string[/^d/] 1 elsif string[/(123#)/] 555 if string[/1/] 4 else 3 end else 0 end end puts alex("1aa123#jshfskjh24324r3") -
100lp created this gist
Feb 25, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ def alex(string) if string[0] == "1" 1 elsif string[/[123]/] 555 else 0 end end puts alex("111jshfskjh24324r3")