From: satomichan Date: Thu, 27 Nov 2025 01:55:47 +0000 (+0900) Subject: JavaScript版を追加. X-Git-Url: https://satomichan.jp/gitweb/?a=commitdiff_plain;h=df3f161dd64aeb67049eefb96fb2d7cd7b7cb4d9;p=tel2ma%2F.git JavaScript版を追加. --- diff --git a/js_tel2ma.js b/js_tel2ma.js new file mode 100755 index 0000000..43b2136 --- /dev/null +++ b/js_tel2ma.js @@ -0,0 +1,663 @@ +'use strict'; + +/* + +tel2ma.js 日本国内電話番号 -> 市外局番・MA・市町村 取得プログラム + + +Copyright 2025 FUKUDA Satomi (https://satomichan.jp/about_tel2ma) + +Licensed under the Apache License, Version 2.0 (the “License”); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an “AS IS” BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and +limitations under the License. + +*/ + + + +// tel に0から始まる日本国内の電話番号を指定して呼び出す. +// 市外局番・MA等の情報が収められた Map を返す. +function tel2ma(tel) { + let [area_code, ma, munics] = ['', '', '']; + let exch = ''; + let subsc = ''; + + tel = tel.replace(/[0-9]/g, (t)=>{return String.fromCharCode(t.charCodeAt(0) - 0xFEE0);} ); + tel = tel.replace(/[^0-9a-zA-Z]/g, ''); + + + if(tel.match(/^0570/)){ + ma = 'ナビダイヤル'; + subsc = tel.length==10? tel: ''; + + }else if(tel.match(/^0120/)){ + ma = 'フリーダイヤル'; + subsc = tel.length==10? tel: ''; + + }else if(tel.match(/^0800/)){ + ma = 'フリーダイヤル'; + subsc = tel.length==11? tel: ''; + + }else if(tel.match(/^050/)){ + ma = 'IP電話'; + subsc = tel.length==11? tel: ''; + + }else if(tel.match(/^0[789]0/)){ + ma = '携帯電話'; + subsc = tel.length==11? tel: ''; + + }else{ + [area_code, ma, munics] = get_ma_info(tel); + + exch = (area_code.length && tel.length>= 6)? tel.substr(area_code.length, 6 - area_code.length) : ''; + subsc = (exch.length && tel.length==10)? tel.substr(-4) : ''; + + ma = ma.length ? (ma + 'MA') : ''; + } + + return new Map([ + ['area_code', area_code ], //市外局番 + ['exchange_number', exch ], //市内局番 + ['subscriber_number', subsc ], //加入者番号 + ['ma', ma ], //MA + ['munics', munics ], //主な市町村 + ]); + +} + + + +function get_ma_info(tel) { + if( tel.startsWith('011') && (tel.match(/^011[1-8]/)) ){return ['011', '札幌', '北海道札幌市,江別市,北広島市,空知郡南幌町']} + if( tel.startsWith('0123') && (tel.match(/^0123[1-4]/) || tel.match(/^01236/)) ){return ['0123', '千歳', '北海道千歳市,恵庭市']} + if( tel.startsWith('0123') && (tel.match(/^01235/) || tel.match(/^01239[0-4]/)) ){return ['0123', '夕張', '北海道夕張市']} + if( tel.startsWith('0123') && (tel.match(/^0123[7-8]/) || tel.match(/^01239[5-9]/)) ){return ['0123', '栗山', '北海道夕張郡由仁町,長沼町,栗山町']} + if( tel.startsWith('0124') && (tel.match(/^0124/)) ){return ['0124', '芦別', '北海道芦別市']} + if( tel.startsWith('0125') && (tel.match(/^0125/)) ){return ['0125', '滝川', '北海道赤平市,滝川市,砂川市,歌志内市,空知郡奈井江町,上砂川町,樺戸郡浦臼町,新十津川町,雨竜郡雨竜町']} + if( tel.startsWith('01267') && (tel.match(/^0126/)) ){return ['01267', '岩見沢', '北海道岩見沢市,美唄市,三笠市,石狩郡新篠津村,樺戸郡月形町']} + if( tel.startsWith('0126') && (tel.match(/^0126/)) ){return ['0126', '岩見沢', '北海道岩見沢市,美唄市,三笠市,石狩郡新篠津村,樺戸郡月形町']} + if( tel.startsWith('0133') && (tel.match(/^01331/) || tel.match(/^0133[6-7]/)) ){return ['0133', '石狩', '北海道石狩市']} + if( tel.startsWith('0133') && (tel.match(/^0133[2-3]/)) ){return ['0133', '当別', '北海道石狩郡当別町']} + if( tel.startsWith('0134') && (tel.match(/^0134/)) ){return ['0134', '小樽', '北海道小樽市']} + if( tel.startsWith('0135') && (tel.match(/^0135[1-4]/)) ){return ['0135', '余市', '北海道積丹郡積丹町,古平郡古平町,余市郡仁木町,余市町,赤井川村']} + if( tel.startsWith('0135') && (tel.match(/^0135[6-7]/)) ){return ['0135', '岩内', '北海道岩内郡共和町,岩内町,古宇郡泊村,神恵内村']} + if( tel.startsWith('0136') && (tel.match(/^0136[1-5]/)) ){return ['0136', '倶知安', '北海道磯谷郡蘭越町,虻田郡ニセコ町,真狩村,留寿都村,喜茂別町,京極町,倶知安町']} + if( tel.startsWith('0136') && (tel.match(/^0136[6-7]/)) ){return ['0136', '寿都', '北海道島牧郡島牧村,寿都郡寿都町,黒松内町']} + if( tel.startsWith('01372') && (tel.match(/^01372/)) ){return ['01372', '鹿部', '北海道茅部郡鹿部町']} + if( tel.startsWith('01374') && (tel.match(/^01374/)) ){return ['01374', '森', '北海道茅部郡森町']} + if( tel.startsWith('01377') && (tel.match(/^0137[5-7]/)) ){return ['01377', '八雲', '北海道二海郡八雲町,山越郡長万部町']} + if( tel.startsWith('0137') && (tel.match(/^0137[5-7]/)) ){return ['0137', '八雲', '北海道二海郡八雲町,山越郡長万部町']} + if( tel.startsWith('0137') && (tel.match(/^01378/)) ){return ['0137', '今金', '北海道瀬棚郡今金町,久遠郡せたな町']} + if( tel.startsWith('0138') && (tel.match(/^0138/)) ){return ['0138', '函館', '北海道函館市,北斗市,亀田郡七飯町']} + if( tel.startsWith('0139') && (tel.match(/^0139[3-4]/)) ){return ['0139', '松前', '北海道松前郡松前町,福島町']} + if( tel.startsWith('0139') && (tel.match(/^0139[5-6]/)) ){return ['0139', '江差', '北海道檜山郡江差町,上ノ国町,厚沢部町,爾志郡乙部町']} + if( tel.startsWith('01392') && (tel.match(/^01392/)) ){return ['01392', '木古内', '北海道上磯郡知内町,木古内町']} + if( tel.startsWith('01397') && (tel.match(/^01397/)) ){return ['01397', '奥尻', '北海道奥尻郡奥尻町']} + if( tel.startsWith('01398') && (tel.match(/^01398/)) ){return ['01398', '熊石', '北海道二海郡八雲町(熊石),久遠郡せたな町(大成区)']} + if( tel.startsWith('0142') && (tel.match(/^0142/)) ){return ['0142', '伊達', '北海道伊達市,虻田郡豊浦町,有珠郡壮瞥町,虻田郡洞爺湖町']} + if( tel.startsWith('0143') && (tel.match(/^0143/)) ){return ['0143', '室蘭', '北海道室蘭市,登別市']} + if( tel.startsWith('0144') && (tel.match(/^0144/)) ){return ['0144', '苫小牧', '北海道苫小牧市,白老郡白老町']} + if( tel.startsWith('0145') && (tel.match(/^0145[2-3]/)) ){return ['0145', '早来', '北海道勇払郡厚真町,安平町']} + if( tel.startsWith('0145') && (tel.match(/^0145[4-5]/)) ){return ['0145', '鵡川', '北海道勇払郡むかわ町']} + if( tel.startsWith('01456') && (tel.match(/^0145[6-7]/)) ){return ['01456', '門別富川', '北海道沙流郡日高町,平取町']} + if( tel.startsWith('01457') && (tel.match(/^0145[6-7]/)) ){return ['01457', '門別富川', '北海道沙流郡日高町,平取町']} + if( tel.startsWith('0146') && (tel.match(/^01462/) || tel.match(/^01463[0-1]/) || tel.match(/^014636/) || tel.match(/^01463[8-9]/)) ){return ['0146', '浦河', '北海道浦河郡浦河町,様似郡様似町']} + if( tel.startsWith('0146') && (tel.match(/^01463[2-5]/) || tel.match(/^014637/) || tel.match(/^0146[4-5]/)) ){return ['0146', '静内', '北海道新冠郡新冠町,日高郡新ひだか町']} + if( tel.startsWith('01466') && (tel.match(/^01466/)) ){return ['01466', 'えりも', '北海道幌泉郡えりも町']} + if( tel.startsWith('015') && (tel.match(/^01541[0-6]/) || tel.match(/^01541[8-9]/) || tel.match(/^01548/)) ){return ['015', '弟子屈', '北海道川上郡標茶町,弟子屈町']} + if( tel.startsWith('015') && (tel.match(/^01551[0-6]/) || tel.match(/^01551[8-9]/) || tel.match(/^01557/)) ){return ['015', '十勝池田', '北海道中川郡池田町,豊頃町,十勝郡浦幌町']} + if( tel.startsWith('0152') && (tel.match(/^01521/) || tel.match(/^0152[4-6]/)) ){return ['0152', '網走', '北海道網走市,斜里郡小清水町']} + if( tel.startsWith('0152') && (tel.match(/^0152[2-3]/)) ){return ['0152', '斜里', '北海道斜里郡斜里町,清里町']} + if( tel.startsWith('0152') && (tel.match(/^0152[7-8]/)) ){return ['0152', '美幌', '北海道網走郡美幌町,津別町,大空町']} + if( tel.startsWith('0153') && (tel.match(/^01531/) || tel.match(/^0153[5-6]/)) ){return ['0153', '厚岸', '北海道厚岸郡厚岸町,浜中町']} + if( tel.startsWith('0153') && (tel.match(/^0153[2-3]/)) ){return ['0153', '根室', '北海道根室市']} + if( tel.startsWith('0153') && (tel.match(/^01534/) || tel.match(/^01537/)) ){return ['0153', '中標津', '北海道野付郡別海町,標津郡中標津町']} + if( tel.startsWith('0153') && (tel.match(/^0153[8-9]/)) ){return ['0153', '根室標津', '北海道標津郡標津町,目梨郡羅臼町']} + if( tel.startsWith('0154') && (tel.match(/^015417/) || tel.match(/^0154[2-6]/) || tel.match(/^01549/)) ){return ['0154', '釧路', '北海道釧路市,釧路郡釧路町,阿寒郡鶴居村']} + if( tel.startsWith('01547') && (tel.match(/^01547/)) ){return ['01547', '白糠', '北海道白糠郡白糠町']} + if( tel.startsWith('0155') && (tel.match(/^015517/) || tel.match(/^0155[2-6]/) || tel.match(/^01559/)) ){return ['0155', '帯広', '北海道帯広市,河東郡音更町,河西郡芽室町,中札内村,更別村,中川郡幕別町']} + if( tel.startsWith('01558') && (tel.match(/^01558/)) ){return ['01558', '広尾', '北海道広尾郡大樹町,広尾町']} + if( tel.startsWith('0156') && (tel.match(/^0156[2-3]/)) ){return ['0156', '本別', '北海道中川郡本別町,足寄郡足寄町,陸別町']} + if( tel.startsWith('0156') && (tel.match(/^01561/) || tel.match(/^0156[6-7]/)) ){return ['0156', '十勝清水', '北海道河東郡鹿追町,上川郡新得町,清水町']} + if( tel.startsWith('01564') && (tel.match(/^01564/)) ){return ['01564', '上士幌', '北海道河東郡士幌町,上士幌町']} + if( tel.startsWith('0157') && (tel.match(/^0157/)) ){return ['0157', '北見', '北海道北見市,常呂郡訓子府町,置戸町']} + if( tel.startsWith('0158') && (tel.match(/^0158[1-3]/)) ){return ['0158', '紋別', '北海道紋別市,紋別郡滝上町']} + if( tel.startsWith('0158') && (tel.match(/^0158[4-5]/)) ){return ['0158', '遠軽', '北海道紋別郡遠軽町']} + if( tel.startsWith('0158') && (tel.match(/^0158[8-9]/)) ){return ['0158', '興部', '北海道紋別郡興部町,西興部村,雄武町']} + if( tel.startsWith('01586') && (tel.match(/^0158[6-7]/)) ){return ['01586', '中湧別', '北海道常呂郡佐呂間町,紋別郡湧別町']} + if( tel.startsWith('01587') && (tel.match(/^0158[6-7]/)) ){return ['01587', '中湧別', '北海道常呂郡佐呂間町,紋別郡湧別町']} + if( tel.startsWith('0162') && (tel.match(/^0162/)) ){return ['0162', '稚内', '北海道稚内市,天塩郡豊富町']} + if( tel.startsWith('0163') && (tel.match(/^01631/) || tel.match(/^0163[6-7]/)) ){return ['0163', '北見枝幸', '北海道枝幸郡枝幸町']} + if( tel.startsWith('0163') && (tel.match(/^0163[8-9]/)) ){return ['0163', '利尻礼文', '北海道礼文郡礼文町,利尻郡利尻町,利尻富士町']} + if( tel.startsWith('01632') && (tel.match(/^01632/)) ){return ['01632', '天塩', '北海道天塩郡遠別町,天塩町,幌延町']} + if( tel.startsWith('01634') && (tel.match(/^0163[4-5]/)) ){return ['01634', '浜頓別', '北海道宗谷郡猿払村,枝幸郡浜頓別町,中頓別町']} + if( tel.startsWith('01635') && (tel.match(/^0163[4-5]/)) ){return ['01635', '浜頓別', '北海道宗谷郡猿払村,枝幸郡浜頓別町,中頓別町']} + if( tel.startsWith('0164') && (tel.match(/^0164[2-3]/)) ){return ['0164', '石狩深川', '北海道深川市,雨竜郡妹背牛町,秩父別町,北竜町,沼田町']} + if( tel.startsWith('0164') && (tel.match(/^0164[4-5]/)) ){return ['0164', '留萌', '北海道留萌市,増毛郡増毛町,留萌郡小平町']} + if( tel.startsWith('0164') && (tel.match(/^0164[6-7]/)) ){return ['0164', '羽幌', '北海道苫前郡苫前町,羽幌町,初山別村']} + if( tel.startsWith('01648') && (tel.match(/^01648/)) ){return ['01648', '焼尻', '北海道苫前郡羽幌町(焼尻島,天売島)']} + if( tel.startsWith('0165') && (tel.match(/^0165[1-3]/)) ){return ['0165', '士別', '北海道士別市,上川郡和寒町,剣淵町,雨竜郡幌加内町']} + if( tel.startsWith('01654') && (tel.match(/^0165[4-5]/)) ){return ['01654', '名寄', '北海道名寄市,上川郡下川町']} + if( tel.startsWith('01655') && (tel.match(/^0165[4-5]/)) ){return ['01655', '名寄', '北海道名寄市,上川郡下川町']} + if( tel.startsWith('01656') && (tel.match(/^01656/)) ){return ['01656', '美深', '北海道中川郡美深町,音威子府村,中川町']} + if( tel.startsWith('01658') && (tel.match(/^01658/)) ){return ['01658', '上川', '北海道上川郡愛別町,上川町']} + if( tel.startsWith('0166') && (tel.match(/^0166/)) ){return ['0166', '旭川', '北海道旭川市,上川郡鷹栖町,東神楽町,当麻町,比布町,東川町,美瑛町']} + if( tel.startsWith('0167') && (tel.match(/^0167/)) ){return ['0167', '富良野', '北海道富良野市,空知郡上富良野町,中富良野町,南富良野町,勇払郡占冠村']} + if( tel.startsWith('017') && (tel.match(/^0171/) || tel.match(/^0177/)) ){return ['017', '青森', '青森県青森市,東津軽郡平内町']} + if( tel.startsWith('0172') && (tel.match(/^0172/)) ){return ['0172', '弘前', '青森県弘前市,黒石市,平川市,中津軽郡西目屋村,南津軽郡藤崎町,大鰐町,田舎館村,北津軽郡板柳町']} + if( tel.startsWith('0173') && (tel.match(/^0173[7-8]/)) ){return ['0173', '鰺ケ沢', '青森県西津軽郡鰺ヶ沢町,深浦町']} + if( tel.startsWith('0173') && (tel.match(/^0173[2-6]/)) ){return ['0173', '五所川原', '青森県五所川原市,つがる市,北津軽郡鶴田町,中泊町']} + if( tel.startsWith('0174') && (tel.match(/^0174/)) ){return ['0174', '蟹田', '青森県東津軽郡今別町,蓬田村,外ヶ浜町']} + if( tel.startsWith('0175') && (tel.match(/^0175[6-7]/)) ){return ['0175', '野辺地', '青森県上北郡野辺地町,横浜町,六ヶ所村']} + if( tel.startsWith('0175') && (tel.match(/^0175[2-4]/)) ){return ['0175', 'むつ', '青森県むつ市,下北郡大間町,東通村,風間浦村,佐井村']} + if( tel.startsWith('0176') && (tel.match(/^0176/)) ){return ['0176', '十和田', '青森県十和田市,三沢市,上北郡七戸町,六戸町,東北町']} + if( tel.startsWith('0178') && (tel.match(/^0178/)) ){return ['0178', '八戸', '青森県八戸市,上北郡おいらせ町,三戸郡五戸町,南部町,階上町,新郷村']} + if( tel.startsWith('0179') && (tel.match(/^0179/)) ){return ['0179', '三戸', '青森県三戸郡三戸町,田子町']} + if( tel.startsWith('018') && (tel.match(/^0181/) || tel.match(/^0188/)) ){return ['018', '秋田', '秋田県秋田市,潟上市,南秋田郡五城目町,八郎潟町,井川町']} + if( tel.startsWith('0182') && (tel.match(/^0182/)) ){return ['0182', '横手', '秋田県横手市,雄勝郡東成瀬村']} + if( tel.startsWith('0183') && (tel.match(/^0183/)) ){return ['0183', '湯沢', '秋田県湯沢市,雄勝郡羽後町']} + if( tel.startsWith('0184') && (tel.match(/^0184/)) ){return ['0184', '本荘', '秋田県由利本荘市,にかほ市']} + if( tel.startsWith('0185') && (tel.match(/^0185[5-8]/)) ){return ['0185', '能代', '秋田県能代市,山本郡藤里町,三種町,八峰町']} + if( tel.startsWith('0185') && (tel.match(/^0185[2-4]/)) ){return ['0185', '男鹿', '秋田県男鹿市,南秋田郡大潟村']} + if( tel.startsWith('0186') && (tel.match(/^0186[2-3]/)) ){return ['0186', '鹿角', '秋田県鹿角市,鹿角郡小坂町']} + if( tel.startsWith('0186') && (tel.match(/^0186[4-5]/) || tel.match(/^01869/)) ){return ['0186', '大館', '秋田県大館市']} + if( tel.startsWith('0186') && (tel.match(/^0186[6-8]/)) ){return ['0186', '鷹巣', '秋田県北秋田市,北秋田郡上小阿仁村']} + if( tel.startsWith('0187') && (tel.match(/^0187[3-5]/)) ){return ['0187', '角館', '秋田県仙北市']} + if( tel.startsWith('0187') && (tel.match(/^0187[6-8]/)) ){return ['0187', '大曲', '秋田県大仙市,仙北郡美郷町']} + if( tel.startsWith('019') && (tel.match(/^0196/) || tel.match(/^0199/)) ){return ['019', '盛岡', '岩手県盛岡市,滝沢市,岩手郡雫石町,紫波郡紫波町,矢巾町']} + if( tel.startsWith('0191') && (tel.match(/^0191/)) ){return ['0191', '一関', '岩手県一関市,西磐井郡平泉町']} + if( tel.startsWith('0192') && (tel.match(/^0192/)) ){return ['0192', '大船渡', '岩手県大船渡市,陸前高田市,気仙郡住田町']} + if( tel.startsWith('0193') && (tel.match(/^0193[2-5]/)) ){return ['0193', '釜石', '岩手県釜石市,上閉伊郡大槌町']} + if( tel.startsWith('0193') && (tel.match(/^01931/) || tel.match(/^0193[6-9]/)) ){return ['0193', '宮古', '岩手県宮古市,下閉伊郡山田町']} + if( tel.startsWith('0194') && (tel.match(/^0194[5-7]/)) ){return ['0194', '久慈', '岩手県久慈市,九戸郡野田村,洋野町']} + if( tel.startsWith('0194') && (tel.match(/^0194[2-4]/)) ){return ['0194', '岩泉', '岩手県下閉伊郡岩泉町,田野畑村,普代村']} + if( tel.startsWith('0195') && (tel.match(/^0195[2-5]/)) ){return ['0195', '二戸', '岩手県二戸市,九戸郡軽米町,九戸村,二戸郡一戸町']} + if( tel.startsWith('0195') && (tel.match(/^0195[6-8]/)) ){return ['0195', '岩手', '岩手県八幡平市,岩手郡葛巻町,岩手町']} + if( tel.startsWith('0197') && (tel.match(/^0197[1-5]/)) ){return ['0197', 'æ°´æ²¢', '岩手県奥州市,胆沢郡金ケ崎町']} + if( tel.startsWith('0197') && (tel.match(/^0197[6-8]/)) ){return ['0197', '北上', '岩手県北上市,和賀郡西和賀町']} + if( tel.startsWith('0198') && (tel.match(/^0198[1-4]/)) ){return ['0198', '花巻', '岩手県花巻市']} + if( tel.startsWith('0198') && (tel.match(/^0198[6-7]/)) ){return ['0198', '遠野', '岩手県遠野市']} + if( tel.startsWith('022') && (tel.match(/^022[1-2]/) || tel.match(/^02230/) || tel.match(/^0223[4-9]/) || tel.match(/^0227/)) ){return ['022', '仙台', '宮城県仙台市,塩竈市,名取市,多賀城市,富谷市,宮城郡松島町,七ヶ浜町,利府町,黒川郡大和町,大郷町,大衡村']} + if( tel.startsWith('0220') && (tel.match(/^0220/)) ){return ['0220', 'è¿«', '宮城県登米市']} + if( tel.startsWith('0223') && (tel.match(/^0223[1-3]/)) ){return ['0223', '岩沼', '宮城県岩沼市,亘理郡亘理町,山元町']} + if( tel.startsWith('0224') && (tel.match(/^0224[5-8]/)) ){return ['0224', '大河原', '宮城県角田市,柴田郡大河原町,村田町,柴田町,川崎町,伊具郡丸森町']} + if( tel.startsWith('0224') && (tel.match(/^0224[2-4]/)) ){return ['0224', '白石', '宮城県白石市,刈田郡蔵王町,七ケ宿町']} + if( tel.startsWith('0225') && (tel.match(/^0225/)) ){return ['0225', '石巻', '宮城県石巻市,東松島市,牡鹿郡女川町']} + if( tel.startsWith('0226') && (tel.match(/^0226/)) ){return ['0226', '気仙沼', '宮城県気仙沼市,本吉郡南三陸町']} + if( tel.startsWith('0228') && (tel.match(/^0228/)) ){return ['0228', '築館', '宮城県栗原市']} + if( tel.startsWith('0229') && (tel.match(/^0229/)) ){return ['0229', '古川', '宮城県大崎市,加美郡色麻町,加美町,遠田郡涌谷町,美里町']} + if( tel.startsWith('023') && (tel.match(/^0231/) || tel.match(/^0236/)) ){return ['023', '山形', '山形県山形市,上山市,天童市,東村山郡山辺町,中山町']} + if( tel.startsWith('0233') && (tel.match(/^0233/)) ){return ['0233', '新庄', '山形県新庄市,最上郡金山町,最上町,舟形町,真室川町,大蔵村,鮭川村,戸沢村']} + if( tel.startsWith('0234') && (tel.match(/^0234/)) ){return ['0234', '酒田', '山形県酒田市,東田川郡庄内町,飽海郡遊佐町']} + if( tel.startsWith('0235') && (tel.match(/^0235/)) ){return ['0235', '鶴岡', '山形県鶴岡市,東田川郡三川町']} + if( tel.startsWith('0237') && (tel.match(/^0237[1-5]/)) ){return ['0237', '村山', '山形県村山市,東根市,尾花沢市,北村山郡大石田町']} + if( tel.startsWith('0237') && (tel.match(/^0237[6-8]/)) ){return ['0237', '寒河江', '山形県寒河江市,西村山郡河北町,西川町,朝日町,大江町']} + if( tel.startsWith('0238') && (tel.match(/^0238[6-8]/)) ){return ['0238', '長井', '山形県長井市,西置賜郡小国町,白鷹町,飯豊町']} + if( tel.startsWith('0238') && (tel.match(/^0238[1-5]/) || tel.match(/^02389/)) ){return ['0238', '米沢', '山形県米沢市,南陽市,東置賜郡高畠町,川西町']} + if( tel.startsWith('024') && (tel.match(/^0249/)) ){return ['024', '郡山', '福島県郡山市']} + if( tel.startsWith('024') && (tel.match(/^0245/) || tel.match(/^024177/)) ){return ['024', '福島', '福島県福島市,伊達市,伊達郡桑折町,国見町,川俣町']} + if( tel.startsWith('0240') && (tel.match(/^0240[1-4]/)) ){return ['0240', '磐城富岡', '福島県双葉郡広野町,楢葉町,富岡町,川内村,大熊町,双葉町,浪江町,葛尾村']} + if( tel.startsWith('0241') && (tel.match(/^0241[2-3]/)) ){return ['0241', '喜多方', '福島県喜多方市,耶麻郡北塩原村,河沼郡湯川村']} + if( tel.startsWith('0241') && (tel.match(/^02416/) || tel.match(/^02419[0-5]/) || tel.match(/^02419[8-9]/)) ){return ['0241', '田島', '福島県南会津郡下郷町,南会津町']} + if( tel.startsWith('0241') && (tel.match(/^0241[4-5]/) || tel.match(/^02419[6-7]/)) ){return ['0241', '柳津', '福島県耶麻郡西会津町,河沼郡柳津町,大沼郡三島町,金山町,昭和村']} + if( tel.startsWith('0241') && (tel.match(/^02417[0-6]/) || tel.match(/^02417[8-9]/) || tel.match(/^02418/)) ){return ['0241', '会津山口', '福島県南会津郡檜枝岐村,只見町']} + if( tel.startsWith('0242') && (tel.match(/^0242/)) ){return ['0242', '会津若松', '福島県会津若松市,耶麻郡磐梯町,猪苗代町,河沼郡会津坂下町,大沼郡会津美里町']} + if( tel.startsWith('0243') && (tel.match(/^0243/)) ){return ['0243', '二本松', '福島県二本松市,本宮市,安達郡大玉村']} + if( tel.startsWith('0244') && (tel.match(/^0244/)) ){return ['0244', '原町', '福島県相馬市,南相馬市,相馬郡新地町,飯舘村']} + if( tel.startsWith('0246') && (tel.match(/^0246/)) ){return ['0246', 'いわき', '福島県いわき市']} + if( tel.startsWith('0247') && (tel.match(/^0247[6-8]/)) ){return ['0247', '三春', '福島県田村市,田村郡三春町,小野町']} + if( tel.startsWith('0247') && (tel.match(/^0247[2-5]/)) ){return ['0247', '石川', '福島県東白川郡棚倉町,矢祭町,塙町,鮫川村,石川郡石川町,玉川村,平田村,浅川町,古殿町']} + if( tel.startsWith('0248') && (tel.match(/^0248[2-5]/)) ){return ['0248', '白河', '福島県白河市,西白河郡西郷村,泉崎村,中島村,矢吹町']} + if( tel.startsWith('0248') && (tel.match(/^0248[6-9]/)) ){return ['0248', '須賀川', '福島県須賀川市,岩瀬郡鏡石町,天栄村']} + if( tel.startsWith('025') && (tel.match(/^025[1-3]/)) ){return ['025', '新潟', '新潟県新潟市']} + if( tel.startsWith('025') && (tel.match(/^0255[5-6]/) || tel.match(/^02560/)) ){return ['025', '糸魚川', '新潟県糸魚川市']} + if( tel.startsWith('025') && (tel.match(/^0255[1-4]/)) ){return ['025', '上越', '新潟県上越市']} + if( tel.startsWith('025') && (tel.match(/^02550/) || tel.match(/^02559/)) ){return ['025', '安塚', '新潟県上越市(安塚区,浦川原区,大島区),十日町市(松之山湯山,松代)']} + if( tel.startsWith('025') && (tel.match(/^0257[5-6]/) || tel.match(/^02580/)) ){return ['025', '十日町', '新潟県十日町市,中魚沼郡津南町']} + if( tel.startsWith('025') && (tel.match(/^02571[0-6]/) || tel.match(/^02571[8-9]/) || tel.match(/^0257[7-8]/)) ){return ['025', '六日町', '新潟県南魚沼市,南魚沼郡湯沢町']} + if( tel.startsWith('025') && (tel.match(/^02570/) || tel.match(/^02579/)) ){return ['025', '小出', '新潟県魚沼市']} + if( tel.startsWith('0250') && (tel.match(/^0250/)) ){return ['0250', '新津', '新潟県五泉市,阿賀野市']} + if( tel.startsWith('0254') && (tel.match(/^0254[1-4]/)) ){return ['0254', '新発田', '新潟県新発田市,胎内市,北蒲原郡聖籠町']} + if( tel.startsWith('0254') && (tel.match(/^0254[5-7]/) || tel.match(/^02548[0-4]/)) ){return ['0254', '村上', '新潟県村上市,岩船郡関川村,粟島浦村']} + if( tel.startsWith('0254') && (tel.match(/^02548[5-9]/) || tel.match(/^02549/)) ){return ['0254', '津川', '新潟県東蒲原郡阿賀町']} + if( tel.startsWith('0255') && (tel.match(/^0255[7-8]/)) ){return ['0255', '新井', '新潟県妙高市']} + if( tel.startsWith('0256') && (tel.match(/^0256[2-6]/)) ){return ['0256', '三条', '新潟県三条市,加茂市,南蒲原郡田上町']} + if( tel.startsWith('0256') && (tel.match(/^0256[7-9]/)) ){return ['0256', 'å·»', '新潟県燕市,西蒲原郡弥彦村']} + if( tel.startsWith('0257') && (tel.match(/^025717/) || tel.match(/^0257[2-4]/)) ){return ['0257', '柏崎', '新潟県柏崎市,刈羽郡刈羽村']} + if( tel.startsWith('0258') && (tel.match(/^0258[1-9]/)) ){return ['0258', '長岡', '新潟県長岡市,小千谷市,見附市,三島郡出雲崎町']} + if( tel.startsWith('0259') && (tel.match(/^0259[1-8]/)) ){return ['0259', '佐渡', '新潟県佐渡市']} + if( tel.startsWith('026') && (tel.match(/^0262/) || tel.match(/^026177/) || tel.match(/^02640/) || tel.match(/^0264[6-9]/)) ){return ['026', '長野', '長野県長野市,須坂市,千曲市,上高井郡小布施町,高山村,上水内郡信濃町,小川村,飯綱町']} + if( tel.startsWith('0260') && (tel.match(/^0260[1-3]/)) ){return ['0260', '阿南町', '長野県下伊那郡阿南町,下條村,売木村,天龍村,泰阜村']} + if( tel.startsWith('0261') && (tel.match(/^0261[1-6]/) || tel.match(/^02617[0-6]/) || tel.match(/^02617[8-9]/) || tel.match(/^0261[8-9]/)) ){return ['0261', '大町', '長野県大町市,北安曇郡池田町,松川村,白馬村,小谷村']} + if( tel.startsWith('0263') && (tel.match(/^0263/)) ){return ['0263', '松本', '長野県松本市,塩尻市,安曇野市,東筑摩郡麻績村,生坂村,山形村,朝日村,筑北村']} + if( tel.startsWith('0264') && (tel.match(/^0264[1-5]/)) ){return ['0264', '木曾福島', '長野県木曽郡上松町,南木曽町,木祖村,王滝村,大桑村,木曽町']} + if( tel.startsWith('0265') && (tel.match(/^0265[6-9]/)) ){return ['0265', '伊那', '長野県伊那市,駒ヶ根市,上伊那郡箕輪町,飯島町,南箕輪村,中川村,宮田村']} + if( tel.startsWith('0265') && (tel.match(/^0265[1-5]/)) ){return ['0265', '飯田', '長野県飯田市,下伊那郡松川町,高森町,阿智村,平谷村,根羽村,喬木村,豊丘村,大鹿村']} + if( tel.startsWith('0266') && (tel.match(/^0266/)) ){return ['0266', '諏訪', '長野県岡谷市,諏訪市,茅野市,諏訪郡下諏訪町,富士見町,原村,上伊那郡辰野町']} + if( tel.startsWith('0267') && (tel.match(/^0267[5-9]/)) ){return ['0267', '佐久', '長野県佐久市,南佐久郡小海町,川上村,南牧村,南相木村,北相木村,佐久穂町,北佐久郡立科町']} + if( tel.startsWith('0267') && (tel.match(/^0267[1-4]/)) ){return ['0267', '小諸', '長野県小諸市,北佐久郡軽井沢町,御代田町']} + if( tel.startsWith('0268') && (tel.match(/^0268/)) ){return ['0268', '上田', '長野県上田市,東御市,小県郡青木村,長和町,埴科郡坂城町']} + if( tel.startsWith('0269') && (tel.match(/^0269[2-5]/)) ){return ['0269', '中野', '長野県中野市,下高井郡山ノ内町']} + if( tel.startsWith('0269') && (tel.match(/^02691/) || tel.match(/^0269[6-8]/)) ){return ['0269', '飯山', '長野県飯山市,下高井郡木島平村,野沢温泉村,下水内郡栄村']} + if( tel.startsWith('027') && (tel.match(/^027[1-2]/) || tel.match(/^02780/) || tel.match(/^0278[8-9]/)) ){return ['027', '前橋', '群馬県前橋市']} + if( tel.startsWith('027') && (tel.match(/^0273/)) ){return ['027', '高崎', '群馬県高崎市,安中市']} + if( tel.startsWith('0270') && (tel.match(/^0270/)) ){return ['0270', '伊勢崎', '群馬県伊勢崎市,佐波郡玉村町']} + if( tel.startsWith('0274') && (tel.match(/^0274[1-5]/)) ){return ['0274', '藤岡', '群馬県藤岡市,多野郡上野村,神流町']} + if( tel.startsWith('0274') && (tel.match(/^0274[6-8]/)) ){return ['0274', '富岡', '群馬県富岡市,甘楽郡下仁田町,南牧村,甘楽町']} + if( tel.startsWith('0276') && (tel.match(/^0276/)) ){return ['0276', '太田', '群馬県太田市,館林市,邑楽郡板倉町,明和町,千代田町,大泉町,邑楽町']} + if( tel.startsWith('0277') && (tel.match(/^0277/)) ){return ['0277', '桐生', '群馬県桐生市,みどり市']} + if( tel.startsWith('0278') && (tel.match(/^0278[1-7]/)) ){return ['0278', '沼田', '群馬県沼田市,利根郡片品村,川場村,昭和村,みなかみ町']} + if( tel.startsWith('0279') && (tel.match(/^0279[8-9]/)) ){return ['0279', '長野原', '群馬県吾妻郡長野原町,嬬恋村,草津町']} + if( tel.startsWith('0279') && (tel.match(/^0279[1-7]/)) ){return ['0279', '渋川', '群馬県渋川市,北群馬郡榛東村,吉岡町,吾妻郡中之条町,高山村,東吾妻町']} + if( tel.startsWith('028') && (tel.match(/^0281/) || tel.match(/^0286/) || tel.match(/^02830/) || tel.match(/^0283[3-4]/) || tel.match(/^02890/) || tel.match(/^0289[2-5]/)) ){return ['028', '宇都宮', '栃木県宇都宮市,さくら市,芳賀郡芳賀町,塩谷郡高根沢町']} + if( tel.startsWith('0280') && (tel.match(/^0280/)) ){return ['0280', '古河', '茨城県古河市,猿島郡五霞町,境町,栃木県下都賀郡野木町']} + if( tel.startsWith('0282') && (tel.match(/^0282/)) ){return ['0282', '栃木', '栃木県栃木市,下都賀郡壬生町']} + if( tel.startsWith('0283') && (tel.match(/^0283[1-2]/) || tel.match(/^0283[5-9]/)) ){return ['0283', '佐野', '栃木県佐野市']} + if( tel.startsWith('0284') && (tel.match(/^0284/)) ){return ['0284', '足利', '栃木県足利市']} + if( tel.startsWith('0285') && (tel.match(/^0285[6-8]/)) ){return ['0285', '真岡', '栃木県真岡市,芳賀郡益子町,茂木町,市貝町']} + if( tel.startsWith('0285') && (tel.match(/^0285[1-5]/) || tel.match(/^02859/)) ){return ['0285', '小山', '栃木県小山市,下野市,河内郡上三川町']} + if( tel.startsWith('0287') && (tel.match(/^0287[6-7]/)) ){return ['0287', '黒磯', '栃木県那須塩原市,那須郡那須町']} + if( tel.startsWith('0287') && (tel.match(/^0287[1-5]/) || tel.match(/^028798/)) ){return ['0287', '大田原', '栃木県大田原市,矢板市,塩谷郡塩谷町']} + if( tel.startsWith('0287') && (tel.match(/^02878/) || tel.match(/^02879[0-7]/) || tel.match(/^028799/)) ){return ['0287', '烏山', '栃木県那須烏山市,那須郡那珂川町']} + if( tel.startsWith('0288') && (tel.match(/^0288/)) ){return ['0288', '今市', '栃木県日光市']} + if( tel.startsWith('0289') && (tel.match(/^02891/) || tel.match(/^0289[6-9]/)) ){return ['0289', '鹿沼', '栃木県鹿沼市']} + if( tel.startsWith('029') && (tel.match(/^029177/) || tel.match(/^0292/) || tel.match(/^02930/) || tel.match(/^0293[5-9]/)) ){return ['029', '水戸', '茨城県水戸市,ひたちなか市,那珂市,東茨城郡茨城町,大洗町,城里町,那珂郡東海村']} + if( tel.startsWith('029') && (tel.match(/^0298/)) ){return ['029', '土浦', '茨城県土浦市,牛久市,つくば市,稲敷市,稲敷郡美浦村,阿見町']} + if( tel.startsWith('0291') && (tel.match(/^0291[1-6]/) || tel.match(/^02917[0-6]/) || tel.match(/^02917[8-9]/) || tel.match(/^0291[8-9]/)) ){return ['0291', '鉾田', '茨城県鉾田市']} + if( tel.startsWith('0293') && (tel.match(/^0293[1-4]/)) ){return ['0293', '高萩', '茨城県高萩市,北茨城市']} + if( tel.startsWith('0294') && (tel.match(/^0294/)) ){return ['0294', '常陸太田', '茨城県日立市,常陸太田市']} + if( tel.startsWith('0295') && (tel.match(/^02951/) || tel.match(/^02955/)) ){return ['0295', '常陸大宮', '茨城県常陸大宮市']} + if( tel.startsWith('0295') && (tel.match(/^02957/)) ){return ['0295', '大子', '茨城県久慈郡大子町']} + if( tel.startsWith('0296') && (tel.match(/^0296[7-8]/)) ){return ['0296', '笠間', '茨城県笠間市']} + if( tel.startsWith('0296') && (tel.match(/^0296[1-5]/)) ){return ['0296', '下館', '茨城県結城市,下妻市,筑西市,桜川市,結城郡八千代町']} + if( tel.startsWith('0297') && (tel.match(/^0297[2-5]/)) ){return ['0297', '水海道', '茨城県常総市,守谷市,坂東市,つくばみらい市']} + if( tel.startsWith('0297') && (tel.match(/^02971/) || tel.match(/^0297[6-9]/)) ){return ['0297', '竜ケ崎', '茨城県龍ケ崎市,取手市,稲敷郡河内町,北相馬郡利根町']} + if( tel.startsWith('0299') && (tel.match(/^0299[2-5]/)) ){return ['0299', '石岡', '茨城県石岡市,かすみがうら市,小美玉市']} + if( tel.startsWith('0299') && (tel.match(/^02991/) || tel.match(/^0299[6-9]/)) ){return ['0299', '潮来', '茨城県鹿嶋市,潮来市,神栖市,行方市']} + if( tel.startsWith('03') && (tel.match(/^03[1-9]/)) ){return ['03', '東京', '東京都23区,狛江市']} + if( tel.startsWith('04') && (tel.match(/^04200/) || tel.match(/^042917/) || tel.match(/^04290/) || tel.match(/^0429[2-6]/) || tel.match(/^04299/)) ){return ['04', '所沢', '埼玉県所沢市,狭山市,入間市']} + if( tel.startsWith('04') && (tel.match(/^04700/) || tel.match(/^04709/)) ){return ['04', '鴨川', '千葉県鴨川市']} + if( tel.startsWith('04') && (tel.match(/^0471[0-6]/) || tel.match(/^04717[0-6]/) || tel.match(/^04717[8-9]/) || tel.match(/^0471[8-9]/)) ){return ['04', '柏', '千葉県野田市,柏市,流山市,我孫子市']} + if( tel.startsWith('042') && (tel.match(/^04220/) || tel.match(/^0423/) || tel.match(/^04240/)) ){return ['042', '国分寺', '東京都府中市,小金井市,小平市,東村山市,国分寺市,多摩市,稲城市']} + if( tel.startsWith('042') && (tel.match(/^0425/) || tel.match(/^04280/) || tel.match(/^04284/)) ){return ['042', '立川', '東京都立川市,昭島市,日野市,国立市,福生市,東大和市,武蔵村山市,羽村市,あきる野市,西多摩郡瑞穂町,日の出町,檜原村']} + if( tel.startsWith('042') && (tel.match(/^0426[1-9]/)) ){return ['042', '八王子', '東京都八王子市']} + if( tel.startsWith('042') && (tel.match(/^0427/) || tel.match(/^0428[5-6]/) || tel.match(/^04281[0-6]/) || tel.match(/^04281[8-9]/)) ){return ['042', '相模原', '東京都町田市,神奈川県相模原市']} + if( tel.startsWith('042') && (tel.match(/^04291[0-6]/) || tel.match(/^04291[8-9]/) || tel.match(/^0429[7-8]/)) ){return ['042', '飯能', '埼玉県飯能市,日高市']} + if( tel.startsWith('0422') && (tel.match(/^0422[1-9]/) || tel.match(/^0424[1-9]/)) ){return ['0422', '武蔵野三鷹', '東京都武蔵野市,三鷹市,調布市,清瀬市,東久留米市,西東京市']} + if( tel.startsWith('042') && (tel.match(/^0422[1-9]/) || tel.match(/^0424[1-9]/)) ){return ['042', '武蔵野三鷹', '東京都武蔵野市,三鷹市,調布市,清瀬市,東久留米市,西東京市']} + if( tel.startsWith('0428') && (tel.match(/^042817/) || tel.match(/^0428[2-3]/) || tel.match(/^0428[7-9]/)) ){return ['0428', '青梅', '東京都青梅市,西多摩郡奥多摩町,山梨県北都留郡小菅村,丹波山村']} + if( tel.startsWith('043') && (tel.match(/^043[1-4]/)) ){return ['043', '千葉', '千葉県千葉市,佐倉市,四街道市,八街市,印旛郡酒々井町']} + if( tel.startsWith('0436') && (tel.match(/^0436/)) ){return ['0436', '市原', '千葉県市原市']} + if( tel.startsWith('0438') && (tel.match(/^043[8-9]/)) ){return ['0438', '木更津', '千葉県木更津市,君津市,富津市,袖ケ浦市']} + if( tel.startsWith('0439') && (tel.match(/^043[8-9]/)) ){return ['0439', '木更津', '千葉県木更津市,君津市,富津市,袖ケ浦市']} + if( tel.startsWith('044') && (tel.match(/^044/)) ){return ['044', '川崎', '神奈川県川崎市']} + if( tel.startsWith('045') && (tel.match(/^045[1-9]/)) ){return ['045', '横浜', '神奈川県横浜市']} + if( tel.startsWith('046') && (tel.match(/^0462/) || tel.match(/^04640/)) ){return ['046', '厚木', '神奈川県厚木市,大和市,海老名市,座間市,愛甲郡愛川町,清川村']} + if( tel.startsWith('046') && (tel.match(/^0468/)) ){return ['046', '横須賀', '神奈川県横須賀市,逗子市,三浦市,三浦郡葉山町']} + if( tel.startsWith('0460') && (tel.match(/^04601/) || tel.match(/^04608/) || tel.match(/^0465/)) ){return ['0460', '小田原', '神奈川県小田原市,南足柄市,足柄上郡中井町,大井町,松田町,山北町,開成町,足柄下郡箱根町,真鶴町,湯河原町']} + if( tel.startsWith('0465') && (tel.match(/^04601/) || tel.match(/^04608/) || tel.match(/^0465/)) ){return ['0465', '小田原', '神奈川県小田原市,南足柄市,足柄上郡中井町,大井町,松田町,山北町,開成町,足柄下郡箱根町,真鶴町,湯河原町']} + if( tel.startsWith('0463') && (tel.match(/^0463/)) ){return ['0463', '平塚', '神奈川県平塚市,秦野市,伊勢原市,中郡大磯町,二宮町']} + if( tel.startsWith('0466') && (tel.match(/^046[6-7]/)) ){return ['0466', '藤沢', '神奈川県鎌倉市,藤沢市,茅ヶ崎市,綾瀬市,高座郡寒川町']} + if( tel.startsWith('0467') && (tel.match(/^046[6-7]/)) ){return ['0467', '藤沢', '神奈川県鎌倉市,藤沢市,茅ヶ崎市,綾瀬市,高座郡寒川町']} + if( tel.startsWith('047') && (tel.match(/^047177/) || tel.match(/^0473/) || tel.match(/^0477[0-2]/)) ){return ['047', '市川', '千葉県市川市,松戸市,浦安市']} + if( tel.startsWith('047') && (tel.match(/^0474/) || tel.match(/^0477[5-7]/)) ){return ['047', '船橋', '千葉県船橋市,習志野市,八千代市,鎌ケ谷市,白井市']} + if( tel.startsWith('0470') && (tel.match(/^0470[1-5]/)) ){return ['0470', '館山', '千葉県館山市,南房総市,安房郡鋸南町']} + if( tel.startsWith('0470') && (tel.match(/^0470[6-8]/)) ){return ['0470', '大原', '千葉県勝浦市,いすみ市,夷隅郡大多喜町,御宿町']} + if( tel.startsWith('0475') && (tel.match(/^0475[1-4]/)) ){return ['0475', '茂原', '千葉県茂原市,長生郡一宮町,睦沢町,長生村,白子町,長柄町,長南町']} + if( tel.startsWith('0475') && (tel.match(/^0475[5-8]/)) ){return ['0475', '東金', '千葉県東金市,山武市,大網白里市,山武郡九十九里町']} + if( tel.startsWith('0476') && (tel.match(/^0476/)) ){return ['0476', '成田', '千葉県成田市,印西市,富里市,印旛郡栄町']} + if( tel.startsWith('0478') && (tel.match(/^04781/) || tel.match(/^0478[5-8]/)) ){return ['0478', '佐原', '千葉県香取市,香取郡神崎町,東庄町']} + if( tel.startsWith('0479') && (tel.match(/^0479[1-4]/) || tel.match(/^04795[1-4]/) || tel.match(/^047956/) || tel.match(/^04795[8-9]/)) ){return ['0479', '銚子', '千葉県銚子市']} + if( tel.startsWith('0479') && (tel.match(/^047950/) || tel.match(/^047955/) || tel.match(/^047957/) || tel.match(/^0479[6-8]/)) ){return ['0479', '八日市場', '千葉県旭市,匝瑳市,香取郡多古町,山武郡芝山町,横芝光町']} + if( tel.startsWith('048') && (tel.match(/^0482/) || tel.match(/^0484/)) ){return ['048', '川口', '埼玉県川口市,蕨市,戸田市,朝霞市,志木市,和光市,新座市']} + if( tel.startsWith('048') && (tel.match(/^0481/) || tel.match(/^048[6-8]/)) ){return ['048', '浦和', '埼玉県さいたま市,春日部市,上尾市,桶川市,蓮田市,北足立郡伊奈町']} + if( tel.startsWith('048') && (tel.match(/^0485/)) ){return ['048', '熊谷', '埼玉県熊谷市,行田市,羽生市,鴻巣市,深谷市,北本市,大里郡寄居町']} + if( tel.startsWith('048') && (tel.match(/^0489/)) ){return ['048', '草加', '埼玉県草加市,越谷市,八潮市,三郷市,吉川市,北葛飾郡松伏町']} + if( tel.startsWith('0480') && (tel.match(/^0480/)) ){return ['0480', '久喜', '埼玉県加須市,久喜市,幸手市,白岡市,南埼玉郡宮代町,北葛飾郡杉戸町']} + if( tel.startsWith('049') && (tel.match(/^049[1-2]/)) ){return ['049', '川越', '埼玉県川越市,富士見市,坂戸市,鶴ヶ島市,ふじみ野市,入間郡三芳町,毛呂山町,越生町,比企郡川島町,鳩山町']} + if( tel.startsWith('0493') && (tel.match(/^0493/)) ){return ['0493', '東松山', '埼玉県東松山市,比企郡滑川町,嵐山町,小川町,吉見町,ときがわ町,秩父郡東秩父村']} + if( tel.startsWith('0494') && (tel.match(/^0494/)) ){return ['0494', '秩父', '埼玉県秩父市,秩父郡横瀬町,皆野町,長瀞町,小鹿野町']} + if( tel.startsWith('0495') && (tel.match(/^0495/)) ){return ['0495', '本庄', '埼玉県本庄市,児玉郡美里町,神川町,上里町']} + if( tel.startsWith('04992') && (tel.match(/^04992/)) ){return ['04992', '伊豆大島', '東京都大島町,東京都利島村,東京都新島村,東京都神津島村']} + if( tel.startsWith('04994') && (tel.match(/^04994/)) ){return ['04994', '三宅', '東京都三宅村,東京都御蔵島村']} + if( tel.startsWith('04996') && (tel.match(/^04996/)) ){return ['04996', '八丈島', '東京都八丈町,東京都青ヶ島村']} + if( tel.startsWith('04998') && (tel.match(/^04998/)) ){return ['04998', '小笠原', '東京都小笠原村']} + if( tel.startsWith('055') && (tel.match(/^055177/) || tel.match(/^0552/)) ){return ['055', '甲府', '山梨県甲府市,南アルプス市,甲斐市,笛吹市,中央市,西八代郡市川三郷町,中巨摩郡昭和町']} + if( tel.startsWith('0551') && (tel.match(/^0551[0-6]/) || tel.match(/^05517[0-6]/) || tel.match(/^05517[8-9]/) || tel.match(/^0551[8-9]/)) ){return ['0551', '韮崎', '山梨県韮崎市,北杜市']} + if( tel.startsWith('0553') && (tel.match(/^0553/)) ){return ['0553', '山梨', '山梨県山梨市,甲州市']} + if( tel.startsWith('0554') && (tel.match(/^0554/)) ){return ['0554', '大月', '山梨県都留市,大月市,上野原市,南都留郡道志村']} + if( tel.startsWith('0555') && (tel.match(/^0555/)) ){return ['0555', '吉田', '山梨県富士吉田市,南都留郡西桂町,忍野村,山中湖村,鳴沢村,富士河口湖町']} + if( tel.startsWith('0556') && (tel.match(/^0556[1-5]/)) ){return ['0556', '鰍沢青柳', '山梨県南巨摩郡早川町,身延町,富士川町']} + if( tel.startsWith('0556') && (tel.match(/^05566/)) ){return ['0556', '身延', '山梨県南巨摩郡南部町']} + if( tel.startsWith('052') && (tel.match(/^052[1-9]/)) ){return ['052', '名古屋', '愛知県名古屋市,清須市,あま市,海部郡大治町']} + if( tel.startsWith('053') && (tel.match(/^053[4-5]/) || tel.match(/^0539[2-5]/) || tel.match(/^05396[4-9]/) || tel.match(/^05397[0-3]/) || tel.match(/^05397[5-6]/) || tel.match(/^05397[8-9]/) || tel.match(/^05398/)) ){return ['053', '浜松', '静岡県浜松市,湖西市']} + if( tel.startsWith('0531') && (tel.match(/^0531/)) ){return ['0531', '田原', '愛知県田原市']} + if( tel.startsWith('0532') && (tel.match(/^0532/) || tel.match(/^0533/)) ){return ['0532', '豊橋', '愛知県豊橋市,豊川市,蒲郡市']} + if( tel.startsWith('0533') && (tel.match(/^0532/) || tel.match(/^0533/)) ){return ['0533', '豊橋', '愛知県豊橋市,豊川市,蒲郡市']} + if( tel.startsWith('0536') && (tel.match(/^0536[1-5]/)) ){return ['0536', '新城', '愛知県新城市']} + if( tel.startsWith('0536') && (tel.match(/^0536[6-8]/)) ){return ['0536', '設楽', '愛知県北設楽郡設楽町,東栄町,豊根村']} + if( tel.startsWith('0537') && (tel.match(/^0537/)) ){return ['0537', '掛川', '静岡県掛川市,御前崎市,菊川市']} + if( tel.startsWith('0538') && (tel.match(/^0538/)) ){return ['0538', '磐田', '静岡県磐田市,袋井市,周智郡森町']} + if( tel.startsWith('0539') && (tel.match(/^05391/) || tel.match(/^05396[0-3]/) || tel.match(/^053974/) || tel.match(/^053977/) || tel.match(/^05399/)) ){return ['0539', '天竜', '静岡県磐田市下野部']} + if( tel.startsWith('054') && (tel.match(/^054[1-3]/) || tel.match(/^0546/) || tel.match(/^0549/)) ){return ['054', '静岡', '静岡県静岡市,焼津市,藤枝市']} + if( tel.startsWith('0544') && (tel.match(/^0544/)) ){return ['0544', '富士宮', '静岡県富士宮市']} + if( tel.startsWith('0545') && (tel.match(/^0545/)) ){return ['0545', '富士', '静岡県富士市']} + if( tel.startsWith('0547') && (tel.match(/^0547/)) ){return ['0547', '島田', '静岡県島田市,榛原郡川根本町']} + if( tel.startsWith('0548') && (tel.match(/^0548/)) ){return ['0548', '榛原', '静岡県牧之原市,榛原郡吉田町']} + if( tel.startsWith('0550') && (tel.match(/^0550/)) ){return ['0550', '御殿場', '静岡県御殿場市,駿東郡小山町']} + if( tel.startsWith('0557') && (tel.match(/^0557/)) ){return ['0557', '伊東', '静岡県熱海市,伊東市,賀茂郡東伊豆町']} + if( tel.startsWith('0558') && (tel.match(/^05581/) || tel.match(/^0558[7-9]/)) ){return ['0558', '修善寺大仁', '静岡県伊豆市']} + if( tel.startsWith('0558') && (tel.match(/^0558[2-6]/)) ){return ['0558', '下田', '静岡県下田市,賀茂郡河津町,南伊豆町,松崎町,西伊豆町']} + if( tel.startsWith('055') && (tel.match(/^0559/)) ){return ['055', '沼津', '静岡県沼津市,三島市,裾野市,伊豆の国市,田方郡函南町,駿東郡清水町,長泉町']} + if( tel.startsWith('0561') && (tel.match(/^0561/)) ){return ['0561', '瀬戸', '愛知県瀬戸市,尾張旭市,日進市,みよし市,長久手市,愛知郡東郷町']} + if( tel.startsWith('0562') && (tel.match(/^0562/)) ){return ['0562', '尾張横須賀', '愛知県東海市,大府市,知多市,豊明市,知多郡東浦町']} + if( tel.startsWith('0563') && (tel.match(/^0563/)) ){return ['0563', '西尾', '愛知県西尾市']} + if( tel.startsWith('0564') && (tel.match(/^0564/)) ){return ['0564', '岡崎', '愛知県岡崎市,額田郡幸田町']} + if( tel.startsWith('0565') && (tel.match(/^0565/)) ){return ['0565', '豊田', '愛知県豊田市']} + if( tel.startsWith('0566') && (tel.match(/^0566/)) ){return ['0566', '刈谷', '愛知県碧南市,刈谷市,安城市,知立市,高浜市']} + if( tel.startsWith('0567') && (tel.match(/^0567/)) ){return ['0567', '津島', '愛知県津島市,愛西市,弥富市,海部郡蟹江町,飛島村,三重県桑名郡木曽岬町']} + if( tel.startsWith('0568') && (tel.match(/^0568/)) ){return ['0568', '春日井', '愛知県春日井市,犬山市,小牧市,北名古屋市,西春日井郡豊山町']} + if( tel.startsWith('0569') && (tel.match(/^0569/)) ){return ['0569', '半田', '愛知県半田市,常滑市,知多郡阿久比町,南知多町,美浜町,武豊町']} + if( tel.startsWith('0572') && (tel.match(/^0572/)) ){return ['0572', '多治見', '岐阜県多治見市,瑞浪市,土岐市']} + if( tel.startsWith('0573') && (tel.match(/^0573[2-5]/)) ){return ['0573', '恵那', '岐阜県恵那市']} + if( tel.startsWith('0573') && (tel.match(/^05731/) || tel.match(/^0573[6-8]/)) ){return ['0573', '中津川', '岐阜県中津川市']} + if( tel.startsWith('0574') && (tel.match(/^0574[1-6]/)) ){return ['0574', '美濃加茂', '岐阜県美濃加茂市,可児市,加茂郡坂祝町,富加町,川辺町,七宗町,八百津町,可児郡御嵩町']} + if( tel.startsWith('0574') && (tel.match(/^0574[7-8]/)) ){return ['0574', '美濃白川', '岐阜県加茂郡白川町,東白川村']} + if( tel.startsWith('0575') && (tel.match(/^0575[1-5]/)) ){return ['0575', '関', '岐阜県関市,美濃市']} + if( tel.startsWith('0575') && (tel.match(/^0575[6-8]/)) ){return ['0575', '郡上八幡', '岐阜県郡上市']} + if( tel.startsWith('0576') && (tel.match(/^0576[1-8]/)) ){return ['0576', '下呂', '岐阜県下呂市']} + if( tel.startsWith('05769') && (tel.match(/^05769/)) ){return ['05769', '荘川', '岐阜県大野郡白川村']} + if( tel.startsWith('0577') && (tel.match(/^0577/)) ){return ['0577', '高山', '岐阜県高山市,飛騨市']} + if( tel.startsWith('0578') && (tel.match(/^0578/)) ){return ['0578', '神岡', '岐阜県飛騨市(神岡町),高山市(上宝町,奥飛騨温泉郷一重ヶ根)']} + if( tel.startsWith('058') && (tel.match(/^0582/) || tel.match(/^0583/)) ){return ['058', '岐阜', '岐阜県岐阜市,羽島市,各務原市,瑞穂市,本巣市,羽島郡岐南町,笠松町,本巣郡北方町']} + if( tel.startsWith('0581') && (tel.match(/^0581/)) ){return ['0581', '高富', '岐阜県山県市']} + if( tel.startsWith('0584') && (tel.match(/^0584/)) ){return ['0584', '大垣', '岐阜県大垣市,海津市,養老郡養老町,不破郡垂井町,関ケ原町,安八郡神戸町,輪之内町,安八町']} + if( tel.startsWith('0585') && (tel.match(/^0585/)) ){return ['0585', '揖斐川', '岐阜県揖斐郡揖斐川町,大野町,池田町']} + if( tel.startsWith('0586') && (tel.match(/^0586/) || tel.match(/^0587/)) ){return ['0586', '一宮', '愛知県一宮市,江南市,稲沢市,岩倉市,丹羽郡大口町,扶桑町']} + if( tel.startsWith('0587') && (tel.match(/^0586/) || tel.match(/^0587/)) ){return ['0587', '一宮', '愛知県一宮市,江南市,稲沢市,岩倉市,丹羽郡大口町,扶桑町']} + if( tel.startsWith('059') && (tel.match(/^059[1-2]/) || tel.match(/^05999/)) ){return ['059', 'æ´¥', '三重県津市']} + if( tel.startsWith('059') && (tel.match(/^0593/)) ){return ['059', '四日市', '三重県四日市市,鈴鹿市,三重郡菰野町,朝日町,川越町']} + if( tel.startsWith('0594') && (tel.match(/^0594/)) ){return ['0594', '桑名', '三重県桑名市,いなべ市,員弁郡東員町']} + if( tel.startsWith('0595') && (tel.match(/^0595[1-7]/)) ){return ['0595', '上野', '三重県名張市,伊賀市']} + if( tel.startsWith('0595') && (tel.match(/^0595[8-9]/)) ){return ['0595', '亀山', '三重県亀山市']} + if( tel.startsWith('0596') && (tel.match(/^0596/)) ){return ['0596', '伊勢', '三重県伊勢市,多気郡明和町,度会郡玉城町,度会町']} + if( tel.startsWith('0597') && (tel.match(/^0597[1-5]/)) ){return ['0597', '尾驚', '三重県尾鷲市,北牟婁郡紀北町']} + if( tel.startsWith('05979') && (tel.match(/^0597[6-8]/) || tel.match(/^05979[7-8]/) || tel.match(/^05979[1-6]/) || tel.match(/^059799/)) ){return ['05979', '熊野', '三重県熊野市,南牟婁郡御浜町']} + if( tel.startsWith('0597') && (tel.match(/^0597[6-8]/) || tel.match(/^05979[7-8]/) || tel.match(/^05979[1-6]/) || tel.match(/^059799/)) ){return ['0597', '熊野', '三重県熊野市,南牟婁郡御浜町']} + if( tel.startsWith('0598') && (tel.match(/^0598[1-6]/)) ){return ['0598', '松阪', '三重県松阪市,多気郡多気町']} + if( tel.startsWith('0598') && (tel.match(/^0598[7-8]/)) ){return ['0598', '三瀬谷', '三重県多気郡大台町,度会郡大紀町']} + if( tel.startsWith('0599') && (tel.match(/^0599[1-3]/)) ){return ['0599', '鳥羽', '三重県鳥羽市']} + if( tel.startsWith('0599') && (tel.match(/^0599[4-8]/)) ){return ['0599', '阿児', '三重県志摩市,度会郡南伊勢町']} + if( tel.startsWith('06') && (tel.match(/^06[1-9]/)) ){return ['06', '大阪', '大阪府大阪市,豊中市,吹田市,守口市,門真市,摂津市,東大阪市,兵庫県尼崎市']} + if( tel.startsWith('072') && (tel.match(/^072177/) || tel.match(/^0728/) || tel.match(/^0723[8-9]/) || tel.match(/^07230/)) ){return ['072', '寝屋川', '大阪府枚方市,寝屋川市,大東市,四條畷市,交野市']} + if( tel.startsWith('0721') && (tel.match(/^0721[1-6]/) || tel.match(/^07217[0-6]/) || tel.match(/^07217[8-9]/) || tel.match(/^0721[8-9]/)) ){return ['0721', '富田林', '大阪府富田林市,河内長野市,南河内郡太子町,河南町,千早赤阪村']} + if( tel.startsWith('072') && (tel.match(/^0722/) || tel.match(/^0723[1-7]/)) ){return ['072', 'å º', '大阪府堺市,松原市,高石市,大阪狭山市']} + if( tel.startsWith('072') && (tel.match(/^0724/)) ){return ['072', '岸和田貝塚', '大阪府岸和田市,貝塚市,泉佐野市,泉南市,阪南市,泉南郡熊取町,田尻町,岬町']} + if( tel.startsWith('0725') && (tel.match(/^0725/)) ){return ['0725', '和泉', '大阪府泉大津市,和泉市,泉北郡忠岡町']} + if( tel.startsWith('072') && (tel.match(/^0726/)) ){return ['072', '茨木', '大阪府高槻市,茨木市']} + if( tel.startsWith('072') && (tel.match(/^0727/)) ){return ['072', '池田', '大阪府池田市,箕面市,豊能郡豊能町,能勢町,兵庫県伊丹市,川西市,川辺郡猪名川町']} + if( tel.startsWith('072') && (tel.match(/^0729/)) ){return ['072', '八尾', '大阪府八尾市,柏原市,羽曳野市,藤井寺市']} + if( tel.startsWith('073') && (tel.match(/^0731/) || tel.match(/^0734/)) ){return ['073', '和歌山', '和歌山県和歌山市,海南市,海草郡紀美野町']} + if( tel.startsWith('0735') && (tel.match(/^0735[1-5]/)) ){return ['0735', '新宮', '三重県南牟婁郡紀宝町,和歌山県新宮市,東牟婁郡那智勝浦町,太地町,北山村']} + if( tel.startsWith('0735') && (tel.match(/^0735[6-8]/)) ){return ['0735', '串本', '和歌山県東牟婁郡古座川町,串本町']} + if( tel.startsWith('0736') && (tel.match(/^07361/) || tel.match(/^0736[6-8]/)) ){return ['0736', '岩出', '和歌山県紀の川市,岩出市']} + if( tel.startsWith('0736') && (tel.match(/^0736[2-5]/)) ){return ['0736', '和歌山橋本', '和歌山県橋本市,伊都郡かつらぎ町,九度山町,高野町']} + if( tel.startsWith('0737') && (tel.match(/^0737/)) ){return ['0737', '湯浅', '和歌山県有田市,有田郡湯浅町,広川町,有田川町']} + if( tel.startsWith('0738') && (tel.match(/^0738/)) ){return ['0738', '御坊', '和歌山県御坊市,日高郡美浜町,日高町,由良町,印南町,日高川町']} + if( tel.startsWith('0739') && (tel.match(/^0739/)) ){return ['0739', '田辺', '和歌山県田辺市,日高郡みなべ町,西牟婁郡白浜町,上富田町,すさみ町']} + if( tel.startsWith('0740') && (tel.match(/^0740[1-3]/)) ){return ['0740', '今津', '滋賀県高島市']} + if( tel.startsWith('0742') && (tel.match(/^0742/) || tel.match(/^0743/)) ){return ['0742', '奈良', '京都府相楽郡笠置町,南山城村,奈良県奈良市,大和郡山市,天理市,生駒市,山辺郡山添村,生駒郡安堵町']} + if( tel.startsWith('0743') && (tel.match(/^0742/) || tel.match(/^0743/)) ){return ['0743', '奈良', '京都府相楽郡笠置町,南山城村,奈良県奈良市,大和郡山市,天理市,生駒市,山辺郡山添村,生駒郡安堵町']} + if( tel.startsWith('0744') && (tel.match(/^0744/) || tel.match(/^0745[1-7]/)) ){return ['0744', '大和高田', '奈良県大和高田市,橿原市,桜井市,御所市,香芝市,葛城市,生駒郡平群町,三郷町,斑鳩町,磯城郡川西町,三宅町,田原本町,高市郡高取町,明日香村,北葛城郡上牧町,王寺町,広陵町,河合町']} + if( tel.startsWith('0745') && (tel.match(/^0744/) || tel.match(/^0745[1-7]/)) ){return ['0745', '大和高田', '奈良県大和高田市,橿原市,桜井市,御所市,香芝市,葛城市,生駒郡平群町,三郷町,斑鳩町,磯城郡川西町,三宅町,田原本町,高市郡高取町,明日香村,北葛城郡上牧町,王寺町,広陵町,河合町']} + if( tel.startsWith('0745') && (tel.match(/^0745[8-9]/)) ){return ['0745', '大和榛原', '奈良県宇陀市,宇陀郡曽爾村,御杖村']} + if( tel.startsWith('0746') && (tel.match(/^0746[3-5]/)) ){return ['0746', '吉野', '奈良県吉野郡吉野町,川上村,東吉野村']} + if( tel.startsWith('0746') && (tel.match(/^07466/)) ){return ['0746', '十津川', '奈良県吉野郡十津川村']} + if( tel.startsWith('07468') && (tel.match(/^07468/)) ){return ['07468', '上北山', '奈良県吉野郡下北山村,上北山村']} + if( tel.startsWith('0747') && (tel.match(/^0747[1-4]/)) ){return ['0747', '五条', '奈良県五條市,吉野郡野迫川村']} + if( tel.startsWith('0747') && (tel.match(/^0747[5-6]/)) ){return ['0747', '下市', '奈良県吉野郡大淀町,下市町,黒滝村,天川村']} + if( tel.startsWith('0748') && (tel.match(/^0748[1-5]/)) ){return ['0748', '八日市', '滋賀県近江八幡市,東近江市,蒲生郡日野町,竜王町']} + if( tel.startsWith('0748') && (tel.match(/^0748[6-8]/)) ){return ['0748', '水口', '滋賀県甲賀市,湖南市']} + if( tel.startsWith('0749') && (tel.match(/^0749[1-4]/)) ){return ['0749', '彦根', '滋賀県彦根市,愛知郡愛荘町,犬上郡豊郷町,甲良町,多賀町']} + if( tel.startsWith('0749') && (tel.match(/^0749[5-8]/)) ){return ['0749', '長浜', '滋賀県長浜市,米原市']} + if( tel.startsWith('075') && (tel.match(/^075[1-9]/)) ){return ['075', '京都', '京都府京都市,府向日市,府長岡京市,府八幡市,府乙訓郡大山崎町,府久世郡久御山町,大阪府三島郡島本町']} + if( tel.startsWith('0761') && (tel.match(/^0761[1-6]/)) ){return ['0761', '小松', '石川県小松市,能美市']} + if( tel.startsWith('0761') && (tel.match(/^07617/) || tel.match(/^07618[0-4]/)) ){return ['0761', '加賀', '石川県加賀市']} + if( tel.startsWith('076') && (tel.match(/^0762/)) ){return ['076', '金沢', '石川県金沢市,かほく市,白山市,野々市市,能美郡川北町,河北郡津幡町,内灘町']} + if( tel.startsWith('0763') && (tel.match(/^0763/)) ){return ['0763', '福野', '富山県砺波市,南砺市']} + if( tel.startsWith('076') && (tel.match(/^0764/)) ){return ['076', '富山', '富山県富山市,滑川市,中新川郡舟橋村,上市町,立山町']} + if( tel.startsWith('0765') && (tel.match(/^0765/)) ){return ['0765', '魚津', '富山県魚津市,黒部市,下新川郡入善町,朝日町']} + if( tel.startsWith('0766') && (tel.match(/^0766/)) ){return ['0766', '高岡', '富山県高岡市,氷見市,小矢部市,射水市']} + if( tel.startsWith('0767') && (tel.match(/^07671/) || tel.match(/^0767[5-8]/)) ){return ['0767', '七尾', '石川県七尾市,鹿島郡中能登町']} + if( tel.startsWith('0767') && (tel.match(/^0767[2-4]/)) ){return ['0767', '羽咋', '石川県羽咋市,羽咋郡志賀町,宝達志水町']} + if( tel.startsWith('0768') && (tel.match(/^0768[1-5]/)) ){return ['0768', '輸島', '石川県輪島市,鳳珠郡穴水町']} + if( tel.startsWith('0768') && (tel.match(/^0768[6-8]/)) ){return ['0768', '能都', '石川県珠洲市,鳳珠郡能登町']} + if( tel.startsWith('0770') && (tel.match(/^0770[1-4]/)) ){return ['0770', '敦賀', '福井県敦賀市,三方郡美浜町,三方上中郡若狭町']} + if( tel.startsWith('0770') && (tel.match(/^0770[5-7]/)) ){return ['0770', '小浜', '福井県小浜市,大飯郡高浜町,おおい町']} + if( tel.startsWith('0771') && (tel.match(/^0771[1-5]/)) ){return ['0771', '亀岡', '京都府亀岡市']} + if( tel.startsWith('0771') && (tel.match(/^0771[6-8]/)) ){return ['0771', '園部', '京都府南丹市,府船井郡京丹波町']} + if( tel.startsWith('0772') && (tel.match(/^0772[1-5]/)) ){return ['0772', '宮津', '京都府宮津市,府与謝郡伊根町,与謝野町']} + if( tel.startsWith('0772') && (tel.match(/^0772[6-8]/)) ){return ['0772', 'å³°å±±', '京都府京丹後市']} + if( tel.startsWith('0773') && (tel.match(/^0773[1-5]/)) ){return ['0773', '福知山', '京都府福知山市,府綾部市']} + if( tel.startsWith('0773') && (tel.match(/^0773[6-8]/)) ){return ['0773', '舞鶴', '京都府舞鶴市']} + if( tel.startsWith('0774') && (tel.match(/^0774/)) ){return ['0774', '宇治', '京都府宇治市,府城陽市,府京田辺市,府木津川市,府綴喜郡井手町,宇治田原町,府相楽郡和束町,精華町']} + if( tel.startsWith('077') && (tel.match(/^0775/)) ){return ['077', '大津', '滋賀県大津市,草津市,守山市,栗東市,野洲市']} + if( tel.startsWith('0776') && (tel.match(/^0776/)) ){return ['0776', '福井', '福井県福井市,あわら市,坂井市,吉田郡永平寺町']} + if( tel.startsWith('0778') && (tel.match(/^0778/)) ){return ['0778', '武生', '福井県鯖江市,越前市,今立郡池田町,南条郡南越前町,丹生郡越前町']} + if( tel.startsWith('0779') && (tel.match(/^07791/) || tel.match(/^07796/) || tel.match(/^07797[7-9]/) || tel.match(/^07798/)) ){return ['0779', '大野', '福井県大野市,勝山市']} + if( tel.startsWith('078') && (tel.match(/^078[1-9]/)) ){return ['078', '神戸', '兵庫県神戸市,明石市']} + if( tel.startsWith('0790') && (tel.match(/^0790[6-8]/)) ){return ['0790', '播磨山崎', '兵庫県宍粟市,佐用郡佐用町']} + if( tel.startsWith('0790') && (tel.match(/^0790[2-5]/)) ){return ['0790', '福崎', '兵庫県加西市,神崎郡市川町,福崎町,神河町']} + if( tel.startsWith('0791') && (tel.match(/^07911/) || tel.match(/^0791[6-7]/)) ){return ['0791', '竜野', '兵庫県たつの市']} + if( tel.startsWith('0791') && (tel.match(/^0791[2-5]/)) ){return ['0791', '相生', '兵庫県相生市,赤穂市,赤穂郡上郡町']} + if( tel.startsWith('079') && (tel.match(/^0792/) || tel.match(/^0793[0-3]/)) ){return ['079', 'å§«è·¯', '兵庫県姫路市,揖保郡太子町']} + if( tel.startsWith('079') && (tel.match(/^0794[0-5]/) || tel.match(/^07949/)) ){return ['079', '加古川', '兵庫県加古川市,高砂市,加古郡稲美町,播磨町']} + if( tel.startsWith('0794') && (tel.match(/^0794[6-8]/)) ){return ['0794', '三木', '兵庫県三木市,小野市']} + if( tel.startsWith('0795') && (tel.match(/^0795[2-4]/)) ){return ['0795', '西脇', '兵庫県西脇市,加東市,多可郡多可町']} + if( tel.startsWith('079') && (tel.match(/^07950/) || tel.match(/^0795[5-6]/) || tel.match(/^07959/)) ){return ['079', '三田', '兵庫県三田市,丹波篠山市']} + if( tel.startsWith('0795') && (tel.match(/^0795[7-8]/)) ){return ['0795', '丹波柏原', '兵庫県丹波市']} + if( tel.startsWith('0796') && (tel.match(/^0796[1-5]/)) ){return ['0796', '豊岡', '兵庫県豊岡市,美方郡香美町']} + if( tel.startsWith('0796') && (tel.match(/^0796[8-9]/)) ){return ['0796', '浜坂', '兵庫県美方郡新温泉町']} + if( tel.startsWith('079') && (tel.match(/^07960/) || tel.match(/^0796[6-7]/)) ){return ['079', '八鹿', '兵庫県養父市,朝来市']} + if( tel.startsWith('0797') && (tel.match(/^0797/) || tel.match(/^0798/)) ){return ['0797', '西宮', '兵庫県西宮市,芦屋市,宝塚市']} + if( tel.startsWith('0798') && (tel.match(/^0797/) || tel.match(/^0798/)) ){return ['0798', '西宮', '兵庫県西宮市,芦屋市,宝塚市']} + if( tel.startsWith('0799') && (tel.match(/^0799[1-5]/)) ){return ['0799', '洲本', '兵庫県洲本市,南あわじ市']} + if( tel.startsWith('0799') && (tel.match(/^0799[6-8]/)) ){return ['0799', '津名', '兵庫県淡路市']} + if( tel.startsWith('082') && (tel.match(/^082[1-2]/) || tel.match(/^0825/) || tel.match(/^0828/) || tel.match(/^08290/) || tel.match(/^08292[1-9]/) || tel.match(/^08294[1-3]/) || tel.match(/^08296/) || tel.match(/^08299/)) ){return ['082', '広島', '広島県広島市,安芸郡府中町,海田町,熊野町,坂町']} + if( tel.startsWith('0820') && (tel.match(/^0820[1-6]/)) ){return ['0820', '柳井', '山口県柳井市,熊毛郡上関町,田布施町,平生町']} + if( tel.startsWith('0820') && (tel.match(/^0820[7-8]/)) ){return ['0820', '久賀', '山口県大島郡周防大島町']} + if( tel.startsWith('0823') && (tel.match(/^0823/)) ){return ['0823', '呉', '広島県呉市,江田島市']} + if( tel.startsWith('0824') && (tel.match(/^0824[4-6]/)) ){return ['0824', '三次', '広島県三次市']} + if( tel.startsWith('082') && (tel.match(/^08240/) || tel.match(/^0824[2-3]/) || tel.match(/^08249/)) ){return ['082', '東広島', '広島県東広島市']} + if( tel.startsWith('0824') && (tel.match(/^0824[7-8]/)) ){return ['0824', '庄原', '広島県庄原市']} + if( tel.startsWith('0826') && (tel.match(/^0826[6-8]/)) ){return ['0826', '千代田', '広島県山県郡北広島町(有田,大朝,戸谷,阿坂)']} + if( tel.startsWith('0826') && (tel.match(/^08261/) || tel.match(/^0826[4-5]/)) ){return ['0826', '安芸吉田', '広島県安芸高田市']} + if( tel.startsWith('0826') && (tel.match(/^0826[2-3]/)) ){return ['0826', '加計', '広島県山県郡安芸太田町']} + if( tel.startsWith('0827') && (tel.match(/^0827/)) ){return ['0827', '岩国', '広島県大竹市,山口県岩国市,玖珂郡和木町']} + if( tel.startsWith('0829') && (tel.match(/^08291/) || tel.match(/^082920/) || tel.match(/^08293/) || tel.match(/^082940/) || tel.match(/^08294[4-9]/) || tel.match(/^08295/) || tel.match(/^0829[7-8]/)) ){return ['0829', '廿日市', '広島県廿日市市']} + if( tel.startsWith('083') && (tel.match(/^0832[1-9]/) || tel.match(/^08376[6-8]/) || tel.match(/^0837[7-8]/)) ){return ['083', '下関', '山口県下関市']} + if( tel.startsWith('0833') && (tel.match(/^0833/)) ){return ['0833', '下松', '山口県下松市,光市']} + if( tel.startsWith('0834') && (tel.match(/^0834/)) ){return ['0834', '徳山', '山口県周南市']} + if( tel.startsWith('0835') && (tel.match(/^0835/)) ){return ['0835', '防府', '山口県防府市']} + if( tel.startsWith('0836') && (tel.match(/^0836[1-9]/)) ){return ['0836', '宇部', '山口県宇部市,山陽小野田市']} + if( tel.startsWith('0837') && (tel.match(/^0837[2-4]/)) ){return ['0837', '長門', '山口県長門市']} + if( tel.startsWith('0837') && (tel.match(/^08375/) || tel.match(/^08376[0-5]/) || tel.match(/^083769/)) ){return ['0837', '美祢', '山口県美祢市']} + if( tel.startsWith('0838') && (tel.match(/^0838[1-5]/)) ){return ['0838', '萩', '山口県萩市']} + if( tel.startsWith('08387') && (tel.match(/^08387/) || tel.match(/^08388/)) ){return ['08387', '田万川', '山口県阿武郡阿武町']} + if( tel.startsWith('08388') && (tel.match(/^08387/) || tel.match(/^08388/)) ){return ['08388', '田万川', '山口県阿武郡阿武町']} + if( tel.startsWith('08396') && (tel.match(/^08360/) || tel.match(/^0839[0-5]/) || tel.match(/^083960/) || tel.match(/^083963/) || tel.match(/^083966/) || tel.match(/^0839[7-9]/) || tel.match(/^083962/) || tel.match(/^08396[4-5]/) || tel.match(/^08396[7-9]/)) ){return ['08396', '山口', '山口県山口市']} + if( tel.startsWith('083') && (tel.match(/^08360/) || tel.match(/^0839[0-5]/) || tel.match(/^083960/) || tel.match(/^083963/) || tel.match(/^083966/) || tel.match(/^0839[7-9]/) || tel.match(/^083962/) || tel.match(/^08396[4-5]/) || tel.match(/^08396[7-9]/)) ){return ['083', '山口', '山口県山口市']} + if( tel.startsWith('0845') && (tel.match(/^0845[2-3]/)) ){return ['0845', '因島', '広島県尾道市(因島重井町,因島中庄町,因島土生町),尾道市(瀬戸田町)']} + if( tel.startsWith('0846') && (tel.match(/^0846[1-4]/)) ){return ['0846', '竹原', '広島県竹原市']} + if( tel.startsWith('0846') && (tel.match(/^0846[6-7]/)) ){return ['0846', '木江', '広島県豊田郡大崎上島町']} + if( tel.startsWith('0847') && (tel.match(/^08471/) || tel.match(/^0847[4-6]/)) ){return ['0847', '府中', '広島県府中市']} + if( tel.startsWith('0847') && (tel.match(/^0847[2-3]/)) ){return ['0847', '甲山', '広島県世羅郡世羅町']} + if( tel.startsWith('08477') && (tel.match(/^08477/) || tel.match(/^0847[8-9]/)) ){return ['08477', '東城', '広島県神石郡神石高原町']} + if( tel.startsWith('0847') && (tel.match(/^08477/) || tel.match(/^0847[8-9]/)) ){return ['0847', '東城', '広島県神石郡神石高原町']} + if( tel.startsWith('0848') && (tel.match(/^0848/) || tel.match(/^08490/) || tel.match(/^084930/) || tel.match(/^08493[3-9]/)) ){return ['0848', '尾道', '広島県三原市,尾道市']} + if( tel.startsWith('084') && (tel.match(/^0848/) || tel.match(/^08490/) || tel.match(/^084930/) || tel.match(/^08493[3-9]/)) ){return ['084', '尾道', '広島県三原市,尾道市']} + if( tel.startsWith('084') && (tel.match(/^0841/) || tel.match(/^0849[1-2]/) || tel.match(/^08493[1-2]/) || tel.match(/^0849[4-9]/)) ){return ['084', '福山', '広島県福山市']} + if( tel.startsWith('08512') && (tel.match(/^08512/)) ){return ['08512', '西郷', '島根県隠岐郡隠岐の島町']} + if( tel.startsWith('08514') && (tel.match(/^08514/)) ){return ['08514', '海士', '島根県隠岐郡海士町,西ノ島町,知夫村']} + if( tel.startsWith('0852') && (tel.match(/^0852/)) ){return ['0852', '松江', '島根県松江市']} + if( tel.startsWith('0853') && (tel.match(/^0853/)) ){return ['0853', '出雲', '島根県出雲市']} + if( tel.startsWith('0854') && (tel.match(/^0854[2-3]/)) ){return ['0854', '安来', '島根県安来市']} + if( tel.startsWith('0854') && (tel.match(/^0854[4-5]/)) ){return ['0854', '木次', '島根県雲南市,仁多郡奥出雲町']} + if( tel.startsWith('0854') && (tel.match(/^0854[6-7]/)) ){return ['0854', '掛合', '島根県飯石郡飯南町']} + if( tel.startsWith('0854') && (tel.match(/^0854[8-9]/)) ){return ['0854', '石見大田', '島根県大田市']} + if( tel.startsWith('0855') && (tel.match(/^0855[1-4]/)) ){return ['0855', '浜田', '島根県浜田市']} + if( tel.startsWith('0855') && (tel.match(/^0855[5-6]/)) ){return ['0855', '江津', '島根県江津市']} + if( tel.startsWith('0855') && (tel.match(/^0855[7-9]/)) ){return ['0855', '川本', '島根県邑智郡川本町,美郷町,邑南町']} + if( tel.startsWith('0856') && (tel.match(/^0856[1-5]/)) ){return ['0856', '益田', '島根県益田市']} + if( tel.startsWith('0856') && (tel.match(/^0856[7-8]/)) ){return ['0856', '津和野', '島根県鹿足郡津和野町,吉賀町']} + if( tel.startsWith('0857') && (tel.match(/^0857/)) ){return ['0857', '鳥取', '鳥取県鳥取市,岩美郡岩美町']} + if( tel.startsWith('0858') && (tel.match(/^0858[7-8]/)) ){return ['0858', '郡家', '鳥取県八頭郡若桜町,智頭町,八頭町']} + if( tel.startsWith('0858') && (tel.match(/^0858[2-6]/)) ){return ['0858', '倉吉', '鳥取県倉吉市,東伯郡三朝町,湯梨浜町,琴浦町,北栄町']} + if( tel.startsWith('0859') && (tel.match(/^0859[1-6]/)) ){return ['0859', '米子', '鳥取県米子市,境港市,西伯郡日吉津村,大山町,南部町,伯耆町']} + if( tel.startsWith('0859') && (tel.match(/^0859[7-8]/)) ){return ['0859', '根雨', '鳥取県日野郡日南町,日野町,江府町']} + if( tel.startsWith('086') && (tel.match(/^0864[2-8]/) || tel.match(/^08652/) || tel.match(/^08655[2-3]/) || tel.match(/^086691/) || tel.match(/^08669[7-8]/)) ){return ['086', '倉敷', '岡山県倉敷市,都窪郡早島町']} + if( tel.startsWith('086') && (tel.match(/^086[1-2]/) || tel.match(/^08680/) || tel.match(/^08689/) || tel.match(/^08690/) || tel.match(/^08694/) || tel.match(/^08636[2-5]/) || tel.match(/^08636[7-9]/) || tel.match(/^08672[2-4]/) || tel.match(/^08672[68]/) || tel.match(/^08673[7-8]/) || tel.match(/^08695[2-39]/)) ){return ['086', '岡山', '岡山県岡山市,久米郡久米南町']} + if( tel.startsWith('0863') && (tel.match(/^0863[2-5]/) || tel.match(/^086366/) || tel.match(/^0863[7-8]/)) ){return ['0863', '玉野', '岡山県玉野市']} + if( tel.startsWith('0865') && (tel.match(/^08654/) || tel.match(/^08655[4-5]/)) ){return ['0865', '鴨方', '岡山県浅口市']} + if( tel.startsWith('0865') && (tel.match(/^08651/) || tel.match(/^0865[6-7]/)) ){return ['0865', '笠岡', '岡山県笠岡市,浅口郡里庄町']} + if( tel.startsWith('0866') && (tel.match(/^0866[1-2]/) || tel.match(/^0866[4-5]/)) ){return ['0866', '高梁', '岡山県高梁市,加賀郡吉備中央町']} + if( tel.startsWith('0866') && (tel.match(/^0866[6-8]/)) ){return ['0866', '井原', '岡山県井原市,小田郡矢掛町']} + if( tel.startsWith('0866') && (tel.match(/^08663/) || tel.match(/^086690/) || tel.match(/^08669[2-6]/) || tel.match(/^086699/)) ){return ['0866', '総社', '岡山県総社市']} + if( tel.startsWith('0867') && (tel.match(/^08672[0-1]/) || tel.match(/^086725/) || tel.match(/^086727/) || tel.match(/^086729/) || tel.match(/^08673[0-6]/) || tel.match(/^086739/)) ){return ['0867', '加茂川', '岡山県加賀郡吉備中央町(井原,下加茂),久米郡美咲町(西川)']} + if( tel.startsWith('0867') && (tel.match(/^0867[7-9]/)) ){return ['0867', '新見', '岡山県新見市']} + if( tel.startsWith('0867') && (tel.match(/^0867[4-6]/)) ){return ['0867', '久世', '岡山県真庭市,真庭郡新庄村']} + if( tel.startsWith('0868') && (tel.match(/^0868[1-6]/)) ){return ['0868', '津山', '岡山県津山市,苫田郡鏡野町,勝田郡勝央町,奈義町,久米郡美咲町']} + if( tel.startsWith('0868') && (tel.match(/^0868[7-8]/)) ){return ['0868', '美作', '岡山県美作市,英田郡西粟倉村']} + if( tel.startsWith('0869') && (tel.match(/^08691/) || tel.match(/^0869[6-8]/) || tel.match(/^08699[1-3]/)) ){return ['0869', '備前', '岡山県備前市,和気郡和気町']} + if( tel.startsWith('0869') && (tel.match(/^08692/) || tel.match(/^086934/)) ){return ['0869', '邑久', '岡山県瀬戸内市']} + if( tel.startsWith('086') && (tel.match(/^08660/) || tel.match(/^08695[0-1]/) || tel.match(/^08695[4-8]/) || tel.match(/^08699[4-9]/)) ){return ['086', '赤磐', '岡山県赤磐市']} + if( tel.startsWith('0875') && (tel.match(/^0875/)) ){return ['0875', '観音寺', '香川県観音寺市,三豊市']} + if( tel.startsWith('0877') && (tel.match(/^0877/)) ){return ['0877', '丸亀', '香川県丸亀市,坂出市,善通寺市,綾歌郡宇多津町,仲多度郡琴平町,多度津町,まんのう町']} + if( tel.startsWith('087') && (tel.match(/^0871/) || tel.match(/^0878/)) ){return ['087', '高松', '香川県高松市,さぬき市,木田郡三木町,香川郡直島町,綾歌郡綾川町']} + if( tel.startsWith('0879') && (tel.match(/^0879[2-5]/)) ){return ['0879', '三本松', '香川県東かがわ市']} + if( tel.startsWith('0879') && (tel.match(/^0879[6-8]/)) ){return ['0879', '土庄', '香川県小豆郡土庄町,小豆島町']} + if( tel.startsWith('0880') && (tel.match(/^08801/) || tel.match(/^0880[3-5]/)) ){return ['0880', '土佐中村', '高知県四万十市,幡多郡三原村,黒潮町']} + if( tel.startsWith('0880') && (tel.match(/^0880[6-7]/)) ){return ['0880', '宿毛', '高知県宿毛市,幡多郡大月町']} + if( tel.startsWith('0880') && (tel.match(/^08802/) || tel.match(/^08809[0-4]/)) ){return ['0880', '窪川', '高知県高岡郡四万十町']} + if( tel.startsWith('0880') && (tel.match(/^08808/) || tel.match(/^08809[5-9]/)) ){return ['0880', '土佐清水', '高知県土佐清水市']} + if( tel.startsWith('0883') && (tel.match(/^0883[2-4]/)) ){return ['0883', '鴨島', '徳島県吉野川市,阿波市']} + if( tel.startsWith('0883') && (tel.match(/^0883[5-6]/)) ){return ['0883', '脇町', '徳島県美馬市,美馬郡つるぎ町']} + if( tel.startsWith('0883') && (tel.match(/^0883[7-8]/)) ){return ['0883', '阿波池田', '徳島県三好市,三好郡東みよし町']} + if( tel.startsWith('0884') && (tel.match(/^0884[1-4]/)) ){return ['0884', '阿南', '徳島県阿南市']} + if( tel.startsWith('0884') && (tel.match(/^08845/) || tel.match(/^08846/)) ){return ['0884', '丹生谷', '徳島県那賀郡那賀町']} + if( tel.startsWith('0884') && (tel.match(/^08847/) || tel.match(/^08848/)) ){return ['0884', '牟岐', '徳島県海部郡牟岐町,美波町,海陽町']} + if( tel.startsWith('0885') && (tel.match(/^0885[3-4]/)) ){return ['0885', '小松島', '徳島県小松島市,勝浦郡勝浦町,上勝町']} + if( tel.startsWith('088') && (tel.match(/^0886/)) ){return ['088', '徳島', '徳島県徳島市,鳴門市,名東郡佐那河内村,名西郡石井町,神山町,板野郡松茂町,北島町,藍住町,板野町,上板町']} + if( tel.startsWith('0887') && (tel.match(/^0887[7-8]/)) ){return ['0887', '嶺北', '高知県長岡郡本山町,大豊町,土佐郡土佐町,大川村']} + if( tel.startsWith('0887') && (tel.match(/^08872/) || tel.match(/^08879/)) ){return ['0887', '室戸', '高知県室戸市,安芸郡東洋町']} + if( tel.startsWith('0887') && (tel.match(/^0887[3-4]/)) ){return ['0887', '安芸', '高知県安芸市,安芸郡奈半利町,田野町,安田町,北川村,馬路村,芸西村']} + if( tel.startsWith('0887') && (tel.match(/^0887[5-6]/)) ){return ['0887', '土佐山田', '高知県香南市,香美市']} + if( tel.startsWith('088') && (tel.match(/^0888/)) ){return ['088', '高知', '高知県高知市,南国市,土佐市,吾川郡いの町']} + if( tel.startsWith('0889') && (tel.match(/^0889[2-3]/)) ){return ['0889', '佐川', '高知県吾川郡仁淀川町,高岡郡佐川町,越知町,日高村']} + if( tel.startsWith('0889') && (tel.match(/^0889[4-6]/)) ){return ['0889', '須崎', '高知県須崎市,高岡郡中土佐町,梼原町,津野町']} + if( tel.startsWith('0892') && (tel.match(/^0892/)) ){return ['0892', '久万', '愛媛県上浮穴郡久万高原町']} + if( tel.startsWith('0893') && (tel.match(/^0893/)) ){return ['0893', '大洲', '愛媛県大洲市,喜多郡内子町']} + if( tel.startsWith('0894') && (tel.match(/^0894[2-5]/)) ){return ['0894', '八幡浜', '愛媛県八幡浜市,西宇和郡伊方町']} + if( tel.startsWith('0894') && (tel.match(/^0894[6-9]/)) ){return ['0894', '宇和', '愛媛県西予市']} + if( tel.startsWith('0895') && (tel.match(/^0895[1-6]/)) ){return ['0895', '宇和島', '愛媛県宇和島市,北宇和郡松野町,鬼北町']} + if( tel.startsWith('0895') && (tel.match(/^0895[7-8]/)) ){return ['0895', '御荘', '愛媛県南宇和郡愛南町']} + if( tel.startsWith('0896') && (tel.match(/^0896/)) ){return ['0896', '伊予三島', '愛媛県四国中央市']} + if( tel.startsWith('0897') && (tel.match(/^0897[7-8]/)) ){return ['0897', '伯方', '愛媛県越智郡上島町']} + if( tel.startsWith('0897') && (tel.match(/^0897[1-6]/)) ){return ['0897', '新居浜', '愛媛県新居浜市,西条市']} + if( tel.startsWith('0898') && (tel.match(/^0898/)) ){return ['0898', '今治', '愛媛県今治市']} + if( tel.startsWith('089') && (tel.match(/^0891/) || tel.match(/^0899/)) ){return ['089', '松山', '愛媛県松山市,伊予市,東温市,伊予郡松前町,砥部町']} + if( tel.startsWith('092') && (tel.match(/^0923[2-3]/)) ){return ['092', '前原', '福岡県糸島市']} + if( tel.startsWith('092') && (tel.match(/^092[1-2]/) || tel.match(/^0923[0-1]/) || tel.match(/^0923[4-9]/) || tel.match(/^092[4-9]/)) ){return ['092', '福岡', '福岡県福岡市,筑紫野市,春日市,大野城市,太宰府市,古賀市,那珂川市,糟屋郡宇美町,篠栗町,志免町,須恵町,新宮町,久山町,粕屋町']} + if( tel.startsWith('0920') && (tel.match(/^09201/) || tel.match(/^0920[3-4]/)) ){return ['0920', '郷ノ浦', '長崎県壱岐市']} + if( tel.startsWith('0920') && (tel.match(/^0920[5-7]/)) ){return ['0920', '厳原', '長崎県対馬市']} + if( tel.startsWith('0920') && (tel.match(/^09208/)) ){return ['0920', '対馬佐賀', '長崎県対馬市(峰町,上県町,上対馬町)']} + if( tel.startsWith('093') && (tel.match(/^093[1-9]/)) ){return ['093', '北九州', '福岡県北九州市,中間市,遠賀郡芦屋町,水巻町,岡垣町,遠賀町,京都郡苅田町']} + if( tel.startsWith('0930') && (tel.match(/^0930/)) ){return ['0930', '行橋', '福岡県行橋市,京都郡みやこ町,築上郡築上町']} + if( tel.startsWith('0940') && (tel.match(/^0940/)) ){return ['0940', '宗像', '福岡県宗像市,福津市']} + if( tel.startsWith('0942') && (tel.match(/^0942/)) ){return ['0942', '久留米', '福岡県久留米市,筑後市,小郡市,三井郡大刀洗町,佐賀県鳥栖市,三養基郡基山町,みやき町']} + if( tel.startsWith('0943') && (tel.match(/^0943[1-5]/)) ){return ['0943', '八女', '福岡県八女市,八女郡広川町']} + if( tel.startsWith('0943') && (tel.match(/^0943[7-8]/)) ){return ['0943', '田主丸', '福岡県うきは市']} + if( tel.startsWith('0944') && (tel.match(/^0944/)) ){return ['0944', '瀬高', '福岡県大牟田市,柳川市,大川市,みやま市,三潴郡大木町']} + if( tel.startsWith('0946') && (tel.match(/^0946/)) ){return ['0946', '甘木', '福岡県朝倉市,朝倉郡筑前町,東峰村']} + if( tel.startsWith('0947') && (tel.match(/^0947/)) ){return ['0947', '田川', '福岡県田川市,田川郡香春町,添田町,糸田町,川崎町,大任町,赤村,福智町']} + if( tel.startsWith('0948') && (tel.match(/^0948/)) ){return ['0948', '飯塚', '福岡県飯塚市,嘉麻市,嘉穂郡桂川町']} + if( tel.startsWith('0949') && (tel.match(/^0949/)) ){return ['0949', '直方', '福岡県直方市,宮若市,鞍手郡小竹町,鞍手町']} + if( tel.startsWith('0950') && (tel.match(/^0950/)) ){return ['0950', '平戸', '長崎県平戸市']} + if( tel.startsWith('0952') && (tel.match(/^0952/)) ){return ['0952', '佐賀', '佐賀県佐賀市,多久市,小城市,神埼市,神埼郡吉野ヶ里町,三養基郡上峰町,杵島郡大町町,江北町,白石町']} + if( tel.startsWith('0954') && (tel.match(/^0954[1-4]/)) ){return ['0954', '武雄', '佐賀県武雄市']} + if( tel.startsWith('0954') && (tel.match(/^0954[6-7]/)) ){return ['0954', '鹿島', '佐賀県鹿島市,嬉野市,藤津郡太良町']} + if( tel.startsWith('0955') && (tel.match(/^0955[5-8]/)) ){return ['0955', '唐津', '佐賀県唐津市,東松浦郡玄海町']} + if( tel.startsWith('0955') && (tel.match(/^0955[2-4]/)) ){return ['0955', '伊万里', '佐賀県伊万里市,西松浦郡有田町']} + if( tel.startsWith('0956') && (tel.match(/^0956/)) ){return ['0956', '佐世保', '長崎県佐世保市,松浦市,東彼杵郡川棚町,波佐見町,北松浦郡佐々町']} + if( tel.startsWith('0957') && (tel.match(/^0957[1-5]/)) ){return ['0957', '諫早', '長崎県諫早市,大村市,雲仙市,東彼杵郡東彼杵町']} + if( tel.startsWith('0957') && (tel.match(/^0957[6-8]/)) ){return ['0957', '島原', '長崎県島原市,南島原市']} + if( tel.startsWith('095') && (tel.match(/^0951/) || tel.match(/^0958/)) ){return ['095', '長崎', '長崎県長崎市,西彼杵郡長与町,時津町']} + if( tel.startsWith('0959') && (tel.match(/^0959[2-3]/)) ){return ['0959', '大瀬戸', '長崎県西海市']} + if( tel.startsWith('0959') && (tel.match(/^0959[6-8]/)) ){return ['0959', '福江', '長崎県五島市']} + if( tel.startsWith('0959') && (tel.match(/^0959[4-5]/)) ){return ['0959', '有川', '長崎県北松浦郡小値賀町,南松浦郡新上五島町']} + if( tel.startsWith('096') && (tel.match(/^096[1-3]/)) ){return ['096', '熊本', '熊本県熊本市,合志市,菊池郡大津町,菊陽町,阿蘇郡西原村,上益城郡御船町,嘉島町,益城町,甲佐町']} + if( tel.startsWith('0964') && (tel.match(/^0964/)) ){return ['0964', '松橋', '熊本県宇土市,上天草市,宇城市,下益城郡美里町']} + if( tel.startsWith('0965') && (tel.match(/^0965/)) ){return ['0965', '八代', '熊本県八代市,八代郡氷川町']} + if( tel.startsWith('0966') && (tel.match(/^0966[2-5]/)) ){return ['0966', '人吉', '熊本県人吉市,球磨郡錦町,多良木町,湯前町,水上村,相良村,五木村,山江村,球磨村,あさぎり町']} + if( tel.startsWith('0966') && (tel.match(/^0966[6-8]/)) ){return ['0966', 'æ°´ä¿£', '熊本県水俣市,葦北郡芦北町,津奈木町']} + if( tel.startsWith('0967') && (tel.match(/^0967[2-5]/)) ){return ['0967', '熊本一の宮', '熊本県阿蘇市,阿蘇郡南小国町,小国町,産山村']} + if( tel.startsWith('0967') && (tel.match(/^0967[7-8]/)) ){return ['0967', '矢部', '熊本県上益城郡山都町']} + if( tel.startsWith('0967') && (tel.match(/^09676/) || tel.match(/^09679/)) ){return ['0967', '高森', '熊本県阿蘇郡高森町,南阿蘇村']} + if( tel.startsWith('0968') && (tel.match(/^0968[1-4]/)) ){return ['0968', '山鹿', '熊本県山鹿市,菊池市']} + if( tel.startsWith('0968') && (tel.match(/^0968[5-8]/)) ){return ['0968', '玉名', '熊本県荒尾市,玉名市,玉名郡玉東町,南関町,長洲町,和水町']} + if( tel.startsWith('0969') && (tel.match(/^0969[1-8]/)) ){return ['0969', '天草', '熊本県天草市,天草郡苓北町']} + if( tel.startsWith('0972') && (tel.match(/^0972[1-5]/)) ){return ['0972', '佐伯', '大分県佐伯市']} + if( tel.startsWith('0972') && (tel.match(/^0972[6-8]/)) ){return ['0972', '臼杵', '大分県臼杵市,津久見市']} + if( tel.startsWith('0973') && (tel.match(/^0973[1-5]/)) ){return ['0973', '日田', '大分県日田市']} + if( tel.startsWith('0973') && (tel.match(/^0973[7-8]/)) ){return ['0973', '玖珠', '大分県玖珠郡九重町,玖珠町']} + if( tel.startsWith('0974') && (tel.match(/^0974[2-4]/)) ){return ['0974', '三重', '大分県豊後大野市']} + if( tel.startsWith('0974') && (tel.match(/^0974[6-7]/)) ){return ['0974', '竹田', '大分県竹田市']} + if( tel.startsWith('097') && (tel.match(/^0971/) || tel.match(/^0975/)) ){return ['097', '大分', '大分県大分市,由布市']} + if( tel.startsWith('0977') && (tel.match(/^0977/)) ){return ['0977', '別府', '大分県別府市,速見郡日出町']} + if( tel.startsWith('0978') && (tel.match(/^0978[7-8]/)) ){return ['0978', '国東', '大分県国東市,東国東郡姫島村']} + if( tel.startsWith('0978') && (tel.match(/^0978[2-5]/)) ){return ['0978', '豊後高田', '大分県豊後高田市,宇佐市']} + if( tel.startsWith('0978') && (tel.match(/^09786/) || tel.match(/^09789/)) ){return ['0978', '杵築', '大分県杵築市']} + if( tel.startsWith('0979') && (tel.match(/^0979/)) ){return ['0979', '中津', '福岡県豊前市,築上郡吉富町,上毛町,大分県中津市']} + if( tel.startsWith('098') && (tel.match(/^0981/) || tel.match(/^098[8-9]/)) ){return ['098', '那覇', '沖縄県那覇市,宜野湾市,浦添市,糸満市,沖縄市,豊見城市,うるま市,南城市,国頭郡恩納村,宜野座村,金武町,中頭郡読谷村,嘉手納町,北谷町,北中城村,中城村,西原町,島尻郡与那原町,南風原町,渡嘉敷村,座間味村,粟国村,渡名喜村,久米島町,八重瀬町']} + if( tel.startsWith('0980') && (tel.match(/^09801/) || tel.match(/^0980[3-5]/)) ){return ['0980', '名護', '沖縄県名護市,国頭郡国頭村,大宜味村,東村,今帰仁村,本部町,伊江村,島尻郡伊平屋村,伊是名村']} + if( tel.startsWith('09802') && (tel.match(/^09802/)) ){return ['09802', '南大東', '沖縄県島尻郡南大東村,北大東村']} + if( tel.startsWith('0980') && (tel.match(/^0980[6-7]/)) ){return ['0980', '沖縄宮古', '沖縄県宮古島市,宮古郡多良間村']} + if( tel.startsWith('0980') && (tel.match(/^0980[8-9]/)) ){return ['0980', '八重山', '沖縄県石垣市,八重山郡竹富町,与那国町']} + if( tel.startsWith('0982') && (tel.match(/^0982[1-4]/) || tel.match(/^09829[0-4]/)) ){return ['0982', '延岡', '宮崎県延岡市']} + if( tel.startsWith('0982') && (tel.match(/^0982[5-6]/) || tel.match(/^09829[5-9]/)) ){return ['0982', '日向', '宮崎県日向市,東臼杵郡門川町,諸塚村,椎葉村,美郷町']} + if( tel.startsWith('0982') && (tel.match(/^0982[7-8]/)) ){return ['0982', '高千穂', '宮崎県西臼杵郡高千穂町,日之影町,五ヶ瀬町']} + if( tel.startsWith('0983') && (tel.match(/^0983/)) ){return ['0983', '高鍋', '宮崎県西都市,児湯郡高鍋町,新富町,西米良村,木城町,川南町,都農町']} + if( tel.startsWith('0984') && (tel.match(/^0984/)) ){return ['0984', '小林', '宮崎県小林市,えびの市,西諸県郡高原町']} + if( tel.startsWith('0985') && (tel.match(/^0985/)) ){return ['0985', '宮崎', '宮崎県宮崎市,東諸県郡国富町,綾町']} + if( tel.startsWith('0986') && (tel.match(/^0986/)) ){return ['0986', '都城', '宮崎県都城市,北諸県郡三股町,鹿児島県曽於市']} + if( tel.startsWith('0987') && (tel.match(/^0987/)) ){return ['0987', '日南', '宮崎県日南市,串間市']} + if( tel.startsWith('09912') && (tel.match(/^09912/)) ){return ['09912', '中之島', '鹿児島県鹿児島郡十島村']} + if( tel.startsWith('09913') && (tel.match(/^09913/)) ){return ['09913', '硫黄島', '鹿児島県鹿児島郡三島村']} + if( tel.startsWith('099') && (tel.match(/^09917/) || tel.match(/^0992/) || tel.match(/^0998[0-3]/) || tel.match(/^099331/) || tel.match(/^099343/) || tel.match(/^099345/) || tel.match(/^099347/)) ){return ['099', '鹿児島', '鹿児島県鹿児島市,日置市']} + if( tel.startsWith('0993') && (tel.match(/^09932/) || tel.match(/^099330/) || tel.match(/^09933[2-9]/) || tel.match(/^09934[0-2]/) || tel.match(/^099344/) || tel.match(/^099346/) || tel.match(/^09934[8-9]/)) ){return ['0993', '指宿', '鹿児島県指宿市']} + if( tel.startsWith('0993') && (tel.match(/^09931/) || tel.match(/^0993[5-8]/)) ){return ['0993', '加世田', '鹿児島県枕崎市,南さつま市,南九州市']} + if( tel.startsWith('099') && (tel.match(/^09940/) || tel.match(/^0994[7-8]/)) ){return ['099', '志布志', '鹿児島県志布志市,曽於郡大崎町']} + if( tel.startsWith('0994') && (tel.match(/^09941/) || tel.match(/^0994[3-6]/)) ){return ['0994', '鹿屋', '鹿児島県鹿屋市,垂水市,肝属郡東串良町,肝付町']} + if( tel.startsWith('0994') && (tel.match(/^09942/) || tel.match(/^09949/)) ){return ['0994', '大根占', '鹿児島県肝属郡錦江町,南大隅町']} + if( tel.startsWith('0995') && (tel.match(/^09951/) || tel.match(/^0995[4-7]/)) ){return ['0995', '加治木', '鹿児島県霧島市,姶良市,姶良郡湧水町']} + if( tel.startsWith('0995') && (tel.match(/^0995[2-3]/)) ){return ['0995', '大口', '鹿児島県伊佐市']} + if( tel.startsWith('0996') && (tel.match(/^0996[6-8]/)) ){return ['0996', '出水', '鹿児島県阿久根市,出水市,出水郡長島町']} + if( tel.startsWith('0996') && (tel.match(/^0996[1-5]/)) ){return ['0996', '川内', '鹿児島県薩摩川内市,いちき串木野市,薩摩郡さつま町']} + if( tel.startsWith('09969') && (tel.match(/^09969/)) ){return ['09969', '中甑', '鹿児島県薩摩川内市(上甑町中甑,里町里,下甑町青瀬,下甑町手打,鹿島町藺牟田)']} + if( tel.startsWith('0997') && (tel.match(/^09971/) || tel.match(/^0997[5-6]/)) ){return ['0997', '名瀬', '鹿児島県奄美市,大島郡大和村,宇検村,龍郷町,喜界町']} + if( tel.startsWith('0997') && (tel.match(/^0997[8-9]/)) ){return ['0997', '徳之島', '鹿児島県大島郡徳之島町,天城町,伊仙町,和泊町,知名町,与論町']} + if( tel.startsWith('0997') && (tel.match(/^0997[2-3]/)) ){return ['0997', '種子島', '鹿児島県西之表市,熊毛郡中種子町,南種子町']} + if( tel.startsWith('0997') && (tel.match(/^09974/)) ){return ['0997', '屋久島', '鹿児島県熊毛郡屋久島町']} + if( tel.startsWith('0997') && (tel.match(/^09977/)) ){return ['0997', '瀬戸内', '鹿児島県大島郡瀬戸内町']} + + return ['', '', '']; +} + diff --git a/misc/make-tel2ma.js.pl b/misc/make-tel2ma.js.pl new file mode 100755 index 0000000..b60c072 --- /dev/null +++ b/misc/make-tel2ma.js.pl @@ -0,0 +1,137 @@ +#!/usr/bin/env -S perl -w + +# tel2ma.pl -> tel2ma.js 変換プログラム + +use strict; +use warnings; + +my $URL = 'https://satomichan.jp/gitweb/?p=tel2ma/.git;a=blob_plain;f=tel2ma.pl'; + +header(); + +open(my $wget, '-|', "wget '$URL' -q -O -") or die; + +print "function get_ma_info(tel) {\n"; + +foreach my $line (<$wget>) { + next unless $line =~ /^__DATA__/ .. 1; + next if $line =~ /^__DATA__/; + + chomp $line; + $line =~ s/#.*$//; + $line =~ s/\s+$//; + next unless $line; + + my( $pref, $ma, $area_codes, $range, $munics ) = split(/\s+/, $line); + + my @ac = sort { length $b <=> length $a } split(/,/, $area_codes); + foreach my $ac (@ac) { + + print " if( tel.startsWith('$ac') && ("; + my @match; + + foreach my $r ( split(/,/, $range) ) { + $r =~ s/(\d)~(\d)$/[$1-$2]/; + push @match, "tel.match(/^0$r/)"; + } #r + + print join(' || ', @match); + print ") ){return ['$ac', '$ma', '$munics']}\n"; + + } #ac + + print ''; + +} #line + +print "\n return ['', '', ''];\n"; +print "}\n\n"; + +exit; + + + +sub header { + print ; + +} + + +__DATA__ +'use strict'; + +/* + +tel2ma.js 日本国内電話番号 -> 市外局番・MA・市町村 取得プログラム + + +Copyright 2025 FUKUDA Satomi (https://satomichan.jp/about_tel2ma) + +Licensed under the Apache License, Version 2.0 (the “License”); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an “AS IS” BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + +See the License for the specific language governing permissions and +limitations under the License. + +*/ + + + +// tel に0から始まる日本国内の電話番号を指定して呼び出す. +// 市外局番・MA等の情報が収められた Map を返す. +function tel2ma(tel) { + let [area_code, ma, munics] = ['', '', '']; + let exch = ''; + let subsc = ''; + + tel = tel.replace(/[0-9]/g, (t)=>{return String.fromCharCode(t.charCodeAt(0) - 0xFEE0);} ); + tel = tel.replace(/[^0-9a-zA-Z]/g, ''); + + + if(tel.match(/^0570/)){ + ma = 'ナビダイヤル'; + subsc = tel.length==10? tel: ''; + + }else if(tel.match(/^0120/)){ + ma = 'フリーダイヤル'; + subsc = tel.length==10? tel: ''; + + }else if(tel.match(/^0800/)){ + ma = 'フリーダイヤル'; + subsc = tel.length==11? tel: ''; + + }else if(tel.match(/^050/)){ + ma = 'IP電話'; + subsc = tel.length==11? tel: ''; + + }else if(tel.match(/^0[789]0/)){ + ma = '携帯電話'; + subsc = tel.length==11? tel: ''; + + }else{ + [area_code, ma, munics] = get_ma_info(tel); + + exch = (area_code.length && tel.length>= 6)? tel.substr(area_code.length, 6 - area_code.length) : ''; + subsc = (exch.length && tel.length==10)? tel.substr(-4) : ''; + + ma = ma.length ? (ma + 'MA') : ''; + } + + return new Map([ + ['area_code', area_code ], //市外局番 + ['exchange_number', exch ], //市内局番 + ['subscriber_number', subsc ], //加入者番号 + ['ma', ma ], //MA + ['munics', munics ], //主な市町村 + ]); + +} + + +