Created
December 15, 2010 15:49
-
-
Save mutolisp/742121 to your computer and use it in GitHub Desktop.
This file contains 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 characters
Dansk Botanisk Arkiv 9(3): 30, t. 3, f. 7-8. 1937. (Dansk Bot. Ark.) | |
Icones plantarum formosanarum nec non et contributiones ad floram formosanam. 5: 256. 1915. (Icon. Pl. Formosan.) | |
Botanical Magazine 26(304): 112-113. 1912. (Bot. Mag. (Tokyo)) | |
Bulletin du Jardin Botanique de Buitenzorg, ser. 2, 2(7): 39, pl. 5, f. 1-2. 1912. (Bull. Jard. Bot. Buitenzorg, ser. 2,) | |
以上是我想處理的文字,主要分成四個部分: | |
1. 最前面文字的部份(期刊、書名) 2. 卷/期/頁數等資訊 3. 年份 4. 縮寫 | |
規則如下: | |
A. 最前面文字的部份擷取出來,當成一個欄位(用 pipeline 分隔) | |
A1. 例外:若有期刊書名為 Sometext text, ser. 4, 時,連同", ser. 4"擷取此部份 | |
B. 將卷/期/頁數獨立出一個欄位 | |
C. 將縮寫獨立出一個欄位 | |
D. 將年份獨立出一個欄位 | |
把上述實例簡化: | |
AAAA BBB CCC 9(3):13. 1928. (A B. C.) | |
AAAA BBBB CCCC 5: 231. 1915 (A. B. C.) | |
AA BB 23(30). 1918 (A. B. (C)) | |
AAAA BBB CCC, ser. 5, 3(2): 19. 1930 (A. B. C, ser. 5) | |
希望可做到 | |
AAAA BBB CCC |9(3):13.| 1928.| A B. C. | |
AAAA BBBB CCCC| 5: 231.| 1915 | A. B. C. | |
AA BB |23(30). |1918 (A. B. (C)) | |
AAAA BBB CCC, ser. 5,|3(2): 19. 1930|A. B. C, ser. 5, | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment