Last active
August 29, 2015 14:07
-
-
Save oleander/21b57c821f6706f512e5 to your computer and use it in GitHub Desktop.
Revisions
-
oleander revised this gist
Sep 28, 2014 . 1 changed file with 3 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 @@ -1,9 +1,8 @@ require "pp" a = "A\s+(.+?)" b = "[\n]+B\s+(.+?)" c = "[\n]+C\s+(.+?)" d = "[\n]+D\s+((?=E)[^E]+|[^\n]+)" e = "[(?=[\n]+E\s+)[\n]+E\s+(.+?)\n]?" pp File.read("ord.txt").scan(/(^\d{1,2})\.\s+(.+?(?=A\s+))#{a}#{b}#{c}#{d}#{e}/m).to_a -
oleander created this gist
Sep 28, 2014 .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,9 @@ require "pp" e = "(E\s+[^\n]+)?" d = "[\n]+D\s+((?=E)[^E]+|[^\n]+)" e = "[(?=[\n]+E\s+)[\n]+E\s+(.+?)\n]?" a = "A\s+(.+?)" b = "[\n]+B\s+(.+?)" c = "[\n]+C\s+(.+?)" pp File.read("ord.txt").scan(/(^\d{1,2})\.\s+(.+?(?=A\s+))#{a}#{b}#{c}#{d}#{e}/m).to_a