Last active
April 9, 2017 09:14
-
-
Save dd-han/b6af5421eee5a678fb419e188003c1b6 to your computer and use it in GitHub Desktop.
Revisions
-
dd-han revised this gist
Apr 9, 2017 . 1 changed file with 4 additions 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 @@ -47,4 +47,7 @@ echo 0900123123 | sed -f sed_file echo "0900-123-123" echo 0800123123 | sed -f sed_file echo "0800-123-123" echo 07012341234 | sed -f sed_file echo "070-1234-1234" -
dd-han revised this gist
Apr 9, 2017 . 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 @@ -1,6 +1,6 @@ # Cellphone and 080X-XXX-XXX free/paid phone number s/^09[0-9][0-9]/&-/g; s/^09[0-9][0-9]-[0-9][0-9][0-9]/&-/g; s/^0[1-7]0/_&-/g; s/^080[0-9]/&-/g; s/^080[0-9]-[0-9][0-9][0-9]/&-/g; # ref: https://zh.wikipedia.org/wiki/中華民國長途電話區號表 @@ -16,4 +16,4 @@ s/^0[2-8]/(&) /g; s/[0-9][0-9][0-9][0-9]$/-&/g # 070 not region code, remove them s/^_//g -
dd-han revised this gist
Apr 9, 2017 . 2 changed files with 5 additions and 24 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 @@ # Cellphone and 080X-XXX-XXX free/paid phone number s/^09[0-9][0-9]/&-/g; s/^09[0-9][0-9]-[0-9][0-9][0-9]/&-/g; s/^0[1-7]0/(&)/g; s/^080[0-9]/&-/g; s/^080[0-9]-[0-9][0-9][0-9]/&-/g; # ref: https://zh.wikipedia.org/wiki/中華民國長途電話區號表 # normal home phone number s/^037/(037) /g; s/^049/(&) /g; s/^0826/(&) /g; s/^082/(&) /g; s/^0836/(&) /g; s/^089/(&) /g s/^0[2-8]/(&) /g; # last four digital always in same group s/[0-9][0-9][0-9][0-9]$/-&/g # 070 not region code, remove them s/(0[1-7]0)/070-/g 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 +0,0 @@ -
dd-han revised this gist
Apr 9, 2017 . 2 changed files with 5 additions 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,6 +1,7 @@ # Cellphone and 080X-XXX-XXX free/paid phone number s/^09[0-9][0-9]/&-/g; s/^09[0-9][0-9]-[0-9][0-9][0-9]/&-/g; s/^080[0-9]/&-/g; s/^080[0-9]-[0-9][0-9][0-9]/&-/g; s/^070/(&)/g; # ref: https://zh.wikipedia.org/wiki/中華民國長途電話區號表 # normal home phone number @@ -17,3 +18,4 @@ s/^089/(&) /g s/^08/(&) /g; # last four digital always in same group s/[0-9][0-9][0-9][0-9]$/-&/g s/(070)/070-/g 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,6 +1,7 @@ # Cellphone and 080X-XXX-XXX free/paid phone number s/^09[0-9][0-9]/&-/g; s/^09[0-9][0-9]-[0-9][0-9][0-9]/&-/g; s/^080[0-9]/&-/g; s/^080[0-9]-[0-9][0-9][0-9]/&-/g; s/^070/(&)/g; # ref: https://zh.wikipedia.org/wiki/中華民國長途電話區號表 # normal home phone number @@ -12,4 +13,5 @@ s/^0836/(&) /g; s/^089/(&) /g s/^0[2-8]/(&) /g; # last four digital always in same group s/[0-9][0-9][0-9][0-9]$/-&/g s/(070)/070-/g -
dd-han revised this gist
Apr 9, 2017 . 2 changed files with 16 additions 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 @@ -11,7 +11,7 @@ s/^049/(&) /g; s/^04/(&) /g; s/^0[567]/(&) /g; s/^0826/(&) /g; s/^082/(&) /g; s/^0836/(&) /g; s/^089/(&) /g s/^08/(&) /g; 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,15 @@ # Cellphone and 080X-XXX-XXX free/paid phone number s/^09[0-9][0-9]/&-/g; s/^09[0-9][0-9]-[0-9][0-9][0-9]/&-/g; s/^080[0-9]/&-/g; s/^080[0-9]-[0-9][0-9][0-9]/&-/g; # ref: https://zh.wikipedia.org/wiki/中華民國長途電話區號表 # normal home phone number s/^037/(037) /g; s/^049/(&) /g; s/^0826/(&) /g; s/^082/(&) /g; s/^0836/(&) /g; s/^089/(&) /g s/^0[2-8]/(&) /g; # last four digital always in same group s/[0-9][0-9][0-9][0-9]$/-&/g -
dd-han revised this gist
Apr 9, 2017 . 1 changed file with 11 additions and 8 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,16 +1,19 @@ # Cellphone and 080X-XXX-XXX free/paid phone number s/^09[0-9][0-9]/&-/g; s/^09[0-9][0-9]-[0-9][0-9][0-9]/&-/g; s/^080[0-9]/&-/g; s/^080[0-9]-[0-9][0-9][0-9]/&-/g; # ref: https://zh.wikipedia.org/wiki/中華民國長途電話區號表 # normal home phone number s/^02/(&) /g; s/^037/(037) /g; s/^03/(&) /g; s/^049/(&) /g; s/^04/(&) /g; s/^0[567]/(&) /g; s/^0826/(&) /g; s/^082/(&)/g; s/^0836/(&) /g; s/^089/(&) /g s/^08/(&) /g; # last four digital always in same group s/[0-9][0-9][0-9][0-9]$/-&/g -
dd-han revised this gist
Apr 9, 2017 . 2 changed files with 9 additions and 3 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,16 +1,16 @@ # ref: https://zh.wikipedia.org/wiki/ s/^02/(&) /g; s/^03[^7]/(&/g; s/^(03/(03) /g; s/^037/(037) /g; s/^04[^9]/(&/g; s/^(04/(04) /g; s/^049/(&) /g; s/^0[567]/(&) /g; s/^08[^0239]/(&/g; s/(08/(08) /g; s/^089/(&)/g s/^082[^6]/(&/g; s/(082/(082) /g; s/^0826/(&) /g; s/^0836/(&) /g; s/^080[0-9]/&-/g; s/^080[0-9]-[0-9][0-9][0-9]/&-/g; s/^09[0-9][0-9]/&-/g; s/^09[0-9][0-9]-[0-9][0-9][0-9]/&-/g; s/[0-9][0-9][0-9][0-9]$/-&/g 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 @@ -42,3 +42,9 @@ echo "(0826)" echo 083611234 | sed -f sed_file echo "(0836) 1-1234" echo 0900123123 | sed -f sed_file echo "0900-123-123" echo 0800123123 | sed -f sed_file echo "0800-123-123" -
dd-han created this gist
Apr 9, 2017 .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,16 @@ # ref: https://zh.wikipedia.org/wiki/中華民國長途電話區號表 s/^02/(&) /g; s/^03[^7]/(&/g; s/^(03/(03) /g; s/^037/(037) /g; s/^04[^9]/(&/g; s/^(04/(04) /g; s/^049/(&) /g; s/^0[567]/(&) /g; s/^08[^329]/(&/g; s/(08/(08) /g; s/^089/(&)/g s/^082[^6]/(&/g; s/(082/(082) /g; s/^0826/(&) /g; s/^0836/(&) /g; s/^080[0-9]/&-/g; s/^080[0-9]-[0-9][0-9][0-9]/&-/g; s/^09[0-9][0-9]/&-/g; s/^09[0-9][0-9]-[0-9][0-9][0-9]/&-/g; s/[0-9][0-9][0-9][0-9]$/-&/g 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,44 @@ echo 0212341234 | sed -f sed_file echo "(02) 1234-1234" echo 031231234 | sed -f sed_file echo "(03) 123-1234" echo 037121234 | sed -f sed_file echo "(037) 12-1234" echo 0412341234 | sed -f sed_file echo "(04) 1234-1234" echo 047121234 | sed -f sed_file echo "(04) 712-1234" echo 048121234 | sed -f sed_file echo "(04) 812-1234" echo 0491231234 | sed -f sed_file echo "(049) 123-1234" echo 051231234 | sed -f sed_file echo "(05) 123-1234" echo 061231234 | sed -f sed_file echo "(06) 123-1234" echo 071231234 | sed -f sed_file echo "(07) 123-1234" echo 081231234 | sed -f sed_file echo "(08) 123-1234" echo 089121234 | sed -f sed_file echo "(089) 12-1234" echo 082121234 | sed -f sed_file echo "(082) 12-1234" echo 0826 | sed -f sed_file echo "(0826)" echo 083611234 | sed -f sed_file echo "(0836) 1-1234"