ちゃっぴの監禁部屋

ガチガチに締めすぎて動きがとれなくなる。。。

ホーム 連絡をする 同期する ( RSS 2.0 ) Login
投稿数  405  : 記事  5  : コメント  12076  : トラックバック  134

ニュース

記事カテゴリ

書庫

日記カテゴリ

Communities

Personal Information

これは何でょう? の回答。

一発目で答えが出てしまいましたが、答えは E-mail address ですね。E-mail address の形式は RFC 5321 で定義されています。

RFC 5321 Simple Mail Transfer Protocol 4.1.2. Command Argument Syntax より

Domain = sub-domain *("." sub-domain) sub-domain = Let-dig [Ldh-str] Let-dig = ALPHA / DIGIT Ldh-str = *( ALPHA / DIGIT / "-" ) Let-dig address-literal = "[" ( IPv4-address-literal / IPv6-address-literal / General-address-literal ) "]" ; See Section 4.1.3 Mailbox = Local-part "@" ( Domain / address-literal ) Local-part = Dot-string / Quoted-string ; MAY be case-sensitive Dot-string = Atom *("." Atom) Atom = 1*atext Quoted-string = DQUOTE *QcontentSMTP DQUOTE QcontentSMTP = qtextSMTP / quoted-pairSMTP quoted-pairSMTP = %d92 %d32-126 ; i.e., backslash followed by any ASCII ; graphic (including itself) or SPace qtextSMTP = %d32-33 / %d35-91 / %d93-126 ; i.e., within a quoted string, any ; ASCII graphic or space is permitted ; without blackslash-quoting except ; double-quote and the backslash itself.

RFC 5322 Internet Message Format 3.2.3. Atom より

atext = ALPHA / DIGIT / ; Printable US-ASCII "!" / "#" / ; characters not including "$" / "%" / ; specials. Used for atoms. "&" / "'" / "*" / "+" / "-" / "/" / "=" / "?" / "^" / "_" / "`" / "{" / "|" / "}" / "~" atom = [CFWS] 1*atext [CFWS]

RFC の定義自体が正規表現を意識して書かれているような気がするので、正規表現にしてしまえ!
ということで、下記を記述。

// Local-part
var atom = "[A-Za-z0-9!#\\$%&'\\*\\+\\-/=\\?\\^_`\\{\\|}~]+";
var dotString = atom + "(?:\\." + atom + ")*";
var qtextSMTP = "[\\x20-\\x21\\x23-\\x5B\\x5D-\\x7E]";
var quotedPairSMTP = "\\\\[\\ox20-\\x7E]";
var quotedString = "\\\"(?:" + qtextSMTP + "|" + quotedPairSMTP + ")+\\\"";
var localPart = "(" + dotString + "|" + quotedString + ")";

// Domain
var letDig = "[A-Za-z0-9]";
var ldhStr = "[A-Za-z0-9\\-]*" + letDig + "+";
var subdomain = letDig + "(?:" + ldhStr + ")*";
var domain = "(" + subdomain + "(?:\\." + subdomain + ")*)";
      
var mailbox = localPart + "@" + domain;

で、出来上がったのが下記になります。

^([A-Za-z0-9!#\$%&'\*\+\-/=\?\^_`\{\|}~]+(?:\.[A-Za-z0-9!#\$%&'\*\+\-/=\?\^_`\{\|}~]+)*|\"(?:[\x20-\x21\x23-\x5B\x5D-\x7E]|\\[\ox20-\x7E])+\")@([A-Za-z0-9](?:[A-Za-z0-9\-]*[A-Za-z0-9]+)*(?:\.[A-Za-z0-9](?:[A-Za-z0-9\-]*[A-Za-z0-9]+)*)*)$

めんどくさいので address-literal には対応していませんが、RFC 5321 に準拠していない E-mail address を弾くのに使えるでしょう。

Bug があったらおせ~てください。

投稿日時 : 2009年4月22日 22:42

コメント

# re: E-mail address (RFC 5321) の正規表現 2009/04/23 13:26 刈歩 菜良 CTP
ご、ごめん...

てか、RFC見て自分で作ったんや。
すご~~~~~~~~~
\(◎o◎)/!

# re: E-mail address (RFC 5321) の正規表現 2009/04/23 19:43 ちゃっぴ
基本的な文法しか使っていないですし、仕様を機械的に実装しているだけなので、正規表現の基礎ができている人ならだれでもできると思いますよ。

RFC の表現についてはちょっとばかしなれる必要あるけどね。

# AyJAVTerFsbnrNuZ 2012/01/07 13:34 http://www.luckyvitamin.com/p-123061-yes-to-carrot
Honestly, not bad news!...

# おかげでこのような素晴らしいブログ投稿のための多くの 2012/01/13 13:16 search engine optimization vancouver
あなたがここに持っているが、同じトピックをカバーする任意のメッセージボードを知っていた場合、私はについて興味があった非常に良いサイトは、ここで議論?私は本当に私は同じ興味を共有する他の有識者から意見を得ることができるコミュニティの一員になりたいです。何か提言をしている場合、私に知らせてください。ありがとう!

# おかげでこのような素晴らしいブログ投稿のための多くの 2012/01/13 14:48 search engine optimization vancouver
こんにちは!これは、あなたのブログに私の最初の訪問です!私たちは、ボランティアのチームであり、同じニッチで社会の新たなイニシアティブを開始。あなたのブログは私達に上で動作するように有益な情報を提供した。あなたは素晴らしい仕事をした!

# Соберем для Вас по сети интернет базу данных потенциальных клиентов для Вашего Бизнеса Подробности на http://prodawez.org.in/ 2012/10/10 17:19 cesynisee
Соберем для Вас по сети интернет базу данных потенциальных клиентов для Вашего Бизнеса Подробности на http://prodawez.org.in/

# Баш 2012/12/31 20:04 alfftgh
Баш

# re: [Windows Mobile]USBキーボードを動かす程度の能力 2017/07/22 18:59 meadc
http://www.ray-ban-sunglasses.us ray-ban sunglasses
http://www.coach-factory-outlet.net coach outlet
http://www.puresoie.fr/ Nike Air Max 90
http://www.katespade.org.au Kate Spade - Online Sale
http://www.coachcarter.com.au coach carter
http://www.mizunoshoes.us Wave Prophecy 2 Shoes
http://www.pandora-rings.co.uk pandora uk
http://www.top-sunglasses.org top sunglasses
http://www.pumashoes.us/ puma shoes
http://www.salomon-shoes.com salomon sneakers
http://www.grandregency.fr/ Air Max Enfants
http://www.swatchwatch.us/ swatch watch
http://www.premierjewelry.us Premier Jewelry - Official
http://www.rayban-outlet.co/ ray ban outlet
http://www.pandoracharms.cc/ pandora charms
http://www.meteo-curtafond.fr/ Nike Air Jordan Enfants
http://www.prada-sunglasses.us Prada Sunglasses - Official
http://www.michael-kors.uk michael kors watches
http://www.artsensuel.fr Nike Air Jordan
me adc7.22trj

# michael kors factory outlet 2018/05/21 12:58 jinyizhixia
http://www.cheap-raybans.com.co
http://www.katesspadeoutlet.us.com
http://www.red-bottomshoes.us.org


# tadalafil stamina rx 2021/11/02 8:35 ivomec
Clomid Accident Fausse Couche

# buy cheap doxycycline https://doxycyline1st.com/
doxycycline 200 mg 2022/02/26 9:39 Jusidkid
buy cheap doxycycline https://doxycyline1st.com/
doxycycline 200 mg

# order clomid https://clomiden.fun/ 2022/04/12 12:54 Clomids
order clomid https://clomiden.fun/

# order clomid online https://clomidonline.icu/ 2022/07/08 13:34 Clomidj
order clomid online https://clomidonline.icu/

# ivermectin buy online https://stromectolbestprice.com/ 2022/07/30 0:28 BestPrice
ivermectin buy online https://stromectolbestprice.com/

# can i buy metformin from canada https://glucophage.top/
metformin 500mg tablets price in india 2022/08/23 7:50 Niujsdkj
can i buy metformin from canada https://glucophage.top/
metformin 500mg tablets price in india

# best treatment for ed https://ed-pills.xyz/
ed medication online 2022/09/17 19:52 EdPills
best treatment for ed https://ed-pills.xyz/
ed medication online

# over the counter sleep aid 2023/01/26 22:33 Jamessop
https://over-the-counter-drug.com/# over the counter appetite suppressant

# online ed meds - https://cheapdr.top/# 2023/04/03 15:14 Dikolipo
online ed meds - https://cheapdr.top/#

# doxycycline 50 mg - https://doxycyclinesale.pro/# 2023/04/22 3:58 Doxycycline
doxycycline 50 mg - https://doxycyclinesale.pro/#

# buy cytotec online - https://cytotecsale.pro/# 2023/04/29 4:34 Cytotec
buy cytotec online - https://cytotecsale.pro/#

# over the counter oral thrush treatment 2023/05/10 2:30 Gregorysew
https://overthecounter.pro/# over the counter pink eye drops

# strongest over the counter painkillers 2023/05/11 7:32 TommyAmora
https://overthecounter.pro/# over the counter pain meds

# best erection pills 2023/05/14 4:32 MichaelExcup
http://pillswithoutprescription.pro/# my canadian drug store

# buy ed pills online 2023/05/14 21:30 MichaelExcup
http://edpills.pro/# buy erection pills

# cheap erectile dysfunction pills: https://edpills.pro/# 2023/05/16 3:12 EdPillsPro
cheap erectile dysfunction pills: https://edpills.pro/#

# ed treatment review 2023/05/16 7:17 MichaelExcup
http://edpills.pro/# ed treatment pills

# prednisone price https://prednisonepills.pro/# - prednisone uk buy 2023/06/05 5:14 Prednisone
prednisone price https://prednisonepills.pro/# - prednisone uk buy

# where to get cytotec pills 2023/06/06 4:59 Davidodota
https://cytotecpills.pro/# cytotec buy online usa

# Cytotec 200mcg price 2023/06/07 11:18 Davidodota
https://prednisonepills.pro/# prednisone 30 mg

# treatments for ed 2023/06/27 9:35 Jamesweeva
https://edpill.pro/# best ed treatment pills

# the best ed pill https://edpill.pro/# - best ed pills online 2023/06/27 14:33 EdPills
the best ed pill https://edpill.pro/# - best ed pills online

# best price for sildenafil 100 mg 2023/06/28 14:31 DavidPaync
http://sildenafilpills.pro/# otc sildenafil 20 mg tablets

# paxlovid india https://paxlovid.life/# buy paxlovid online 2023/07/26 6:10 Paxlovid
paxlovid india https://paxlovid.life/# buy paxlovid online

# buy cytotec online fast delivery https://cytotec.ink/# - order cytotec online 2023/07/27 1:07 PillsFree
buy cytotec online fast delivery https://cytotec.ink/# - order cytotec online

# online apotheke preisvergleich 2023/09/26 13:07 Williamreomo
https://onlineapotheke.tech/# online apotheke gГ?nstig
gГ?nstige online apotheke

# internet apotheke 2023/09/27 0:57 Williamreomo
https://onlineapotheke.tech/# versandapotheke
versandapotheke deutschland

# online apotheke gГјnstig 2023/09/27 1:59 Williamreomo
http://onlineapotheke.tech/# versandapotheke
online apotheke preisvergleich

# п»їonline apotheke 2023/09/27 2:32 Williamreomo
https://onlineapotheke.tech/# gГ?nstige online apotheke
п»?online apotheke

# gГјnstige online apotheke 2023/09/27 3:23 Williamreomo
http://onlineapotheke.tech/# internet apotheke
online apotheke deutschland

# п»їonline apotheke 2023/09/27 5:34 Williamreomo
https://onlineapotheke.tech/# online apotheke gГ?nstig
online apotheke deutschland

# п»їonline apotheke 2023/09/27 8:07 Williamreomo
http://onlineapotheke.tech/# internet apotheke
online apotheke deutschland

# farmacia online 2023/09/27 16:35 Rickeyrof
acheter sildenafil 100mg sans ordonnance

# migliori farmacie online 2023 2023/09/27 21:08 Rickeyrof
acheter sildenafil 100mg sans ordonnance

# farmaci senza ricetta elenco 2023/09/27 21:24 Rickeyrof
acheter sildenafil 100mg sans ordonnance

# canada mail order drug 2023/10/16 15:44 Dannyhealm
Always leaving this place satisfied. http://mexicanpharmonline.shop/# pharmacies in mexico that ship to usa

# canada on line pharmacies 2023/10/16 18:13 Dannyhealm
Their commitment to global excellence is unwavering. https://mexicanpharmonline.com/# pharmacies in mexico that ship to usa

# foreign pharmacies com 2023/10/16 20:01 Dannyhealm
From greeting to checkout, always a pleasant experience. https://mexicanpharmonline.com/# mexican mail order pharmacies

# drug stores in canada 2023/10/16 23:21 Dannyhealm
A name synonymous with international pharmaceutical trust. http://mexicanpharmonline.shop/# mexico drug stores pharmacies

# best international pharmacies online 2023/10/17 13:07 Dannyhealm
Impressed with their dedication to international patient care. https://mexicanpharmonline.shop/# reputable mexican pharmacies online

# canadian farmacy 2023/10/17 19:18 Dannyhealm
A name synonymous with international pharmaceutical trust. https://mexicanpharmonline.shop/# mexico drug stores pharmacies

# canadian oharmacy 2023/10/18 7:16 Dannyhealm
Their private consultation rooms are a great addition. http://mexicanpharmonline.shop/# mexico drug stores pharmacies

# your canada drug store 2023/10/18 13:07 Dannyhealm
Leading the way in global pharmaceutical services. https://mexicanpharmonline.shop/# mexico drug stores pharmacies

# antiplatelet drug https://plavix.guru/ Clopidogrel 75 MG price 2023/10/24 0:39 Plavixxx
antiplatelet drug https://plavix.guru/ Clopidogrel 75 MG price

# cheapest ed pills online 2023/11/20 16:23 WilliamApomb
https://edpills.monster/# top erection pills

# ed drug prices 2023/11/22 2:16 WilliamApomb
http://tadalafil.trade/# buy tadalafil 20

# overseas pharmacies shipping to usa 2023/11/30 8:42 MichaelBum
http://claritin.icu/# ventolin 2mg

# paxlovid generic 2023/12/01 4:35 Mathewhip
Paxlovid buy online https://paxlovid.club/# paxlovid buy

# farmacia online miglior prezzo https://farmaciait.pro/ farmacie online sicure 2023/12/04 10:09 Farmacia
farmacia online miglior prezzo https://farmaciait.pro/ farmacie online sicure

# farmacias baratas online envío gratis 2023/12/07 14:37 RonnieCag
https://vardenafilo.icu/# farmacia online 24 horas

# farmacias baratas online envío gratis 2023/12/07 20:53 RonnieCag
http://sildenafilo.store/# comprar sildenafilo cinfa 100 mg españa

# farmacias online seguras 2023/12/08 6:13 RonnieCag
https://tadalafilo.pro/# farmacias online baratas

# farmacia envíos internacionales 2023/12/08 11:51 RonnieCag
https://tadalafilo.pro/# farmacia 24h

# farmacias baratas online envío gratis 2023/12/09 15:13 RonnieCag
http://farmacia.best/# farmacias online seguras

# ï»¿farmacia online 2023/12/09 18:25 RonnieCag
http://vardenafilo.icu/# farmacia online 24 horas

# farmacia envíos internacionales 2023/12/10 4:58 RonnieCag
https://vardenafilo.icu/# farmacia 24h

# farmacias online seguras en españa 2023/12/11 4:57 RonnieCag
http://vardenafilo.icu/# farmacias baratas online envío gratis

# farmacia online madrid 2023/12/11 8:07 RonnieCag
http://tadalafilo.pro/# farmacia online envío gratis

# farmacias baratas online envío gratis 2023/12/11 10:50 RonnieCag
https://vardenafilo.icu/# farmacia barata

# farmacia envíos internacionales 2023/12/12 2:58 RonnieCag
https://tadalafilo.pro/# farmacias online seguras en españa

# farmacias online seguras en españa 2023/12/13 1:47 RonnieCag
https://tadalafilo.pro/# farmacias online seguras

# Pharmacie en ligne France 2023/12/13 18:12 Larryedump
https://pharmacieenligne.guru/# Acheter médicaments sans ordonnance sur internet

# Pharmacies en ligne certifiées 2023/12/14 1:34 Larryedump
https://pharmacieenligne.guru/# pharmacie ouverte

# acheter medicament a l etranger sans ordonnance 2023/12/14 5:59 Larryedump
https://pharmacieenligne.guru/# Pharmacie en ligne livraison rapide

# ï»¿pharmacie en ligne 2023/12/15 6:48 Larryedump
http://pharmacieenligne.guru/# Pharmacie en ligne livraison gratuite

# п»їonline apotheke 2023/12/17 13:32 FrankTic
https://apotheke.company/# versandapotheke

# where to buy cheap clomid without rx 2023/12/27 1:22 RaymondGrido
http://paxlovid.win/# paxlovid buy

# cost cheap clomid online 2023/12/30 22:35 Stephendep
http://clomid.site/# can i purchase clomid

# doxycycline 500mg 2024/01/05 10:13 BobbyHef
http://cytotec.icu/# Misoprostol 200 mg buy online

# doxycycline 100mg price 2024/01/05 16:04 BobbyHef
http://cytotec.icu/# Misoprostol 200 mg buy online

# over the counter erectile dysfunction pills 2024/01/08 22:07 CharlesDioky
https://sildenafildelivery.pro/# buy sildenafil citrate

# can you get generic clomid without insurance 2024/01/12 11:13 JeffreyRom
https://prednisone.auction/# prednisone 10

# farmacia online migliore 2024/01/15 21:06 Wendellglaks
https://tadalafilitalia.pro/# farmacia online più conveniente

# farmacia online senza ricetta 2024/01/17 0:50 Wendellglaks
http://farmaciaitalia.store/# acquistare farmaci senza ricetta

# tamoxifen citrate pct 2024/01/20 14:30 Normantug
http://cytotec.directory/# Abortion pills online

# tamoxifen warning 2024/01/20 20:33 Normantug
http://cytotec.directory/# Cytotec 200mcg price

# can i get clomid prices 2024/01/20 22:13 AnthonyAnoth
http://prednisonepharm.store/# can i order prednisone

# where buy cheap clomid without rx 2024/01/21 10:07 LarryVoP
Always a step ahead in international healthcare trends http://cytotec.directory/# Abortion pills online

# can you get cheap clomid without rx 2024/01/21 14:49 AnthonyAnoth
https://prednisonepharm.store/# prednisone 20mg prescription cost

# where can i buy clomid pills 2024/01/22 8:10 LarryVoP
They always have the newest products on the market http://prednisonepharm.store/# prednisone steroids

# can you get generic clomid without rx 2024/01/22 13:41 AnthonyAnoth
http://clomidpharm.shop/# can i order generic clomid without insurance

# tamoxifen endometrium 2024/01/22 14:03 Normantug
https://cytotec.directory/# Cytotec 200mcg price

# buy stromectol online 2024/01/30 11:11 Andrewamabs
http://ivermectin.store/# stromectol for head lice

# indian pharmacies safe 2024/02/03 11:39 Jerrysoicy
https://mexicanpharm.shop/# mexican border pharmacies shipping to usa mexicanpharm.shop

# top online sites 2024/03/03 22:57 Thomasjax
http://sweetiefox.online/# Sweetie Fox video

# dating chat site 2024/03/04 23:39 Thomasjax
https://evaelfie.pro/# eva elfie

# christian dating 2024/03/07 10:41 HowardBox
pof dating sites usa: http://sweetiefox.pro/# ph sweetie fox

# find international singles dating 2024/03/08 5:24 HowardBox
vip dating now: https://miamalkova.life/# mia malkova full video

# jogos que dao dinheiro 2024/03/14 6:58 BrianTop
http://aviatormalawi.online/# aviator game

# aviator jogo de aposta 2024/03/14 18:11 BrianTop
https://jogodeaposta.fun/# melhor jogo de aposta para ganhar dinheiro

# aplicativo de aposta 2024/03/15 5:23 BrianTop
https://aviatormalawi.online/# aviator game

# gates of olympus oyna 2024/03/30 1:56 KeithNaf
https://sweetbonanza.bid/# sweet bonanza oyna

# buying generic clomid tablets 2024/04/03 7:08 Robertsuela
https://clomidall.shop/# can i get generic clomid pills

# buying clomid 2024/04/04 2:20 Robertsuela
https://clomidall.shop/# how can i get clomid

# where buy generic clomid for sale 2024/04/05 4:39 Robertsuela
http://clomidall.shop/# where can i get generic clomid

# mexican rx online 2024/04/11 10:50 RoscoeOdose
http://indianpharmgrx.com/# top 10 pharmacies in india

# doxycycline prices 2024/04/11 20:05 Archiewef
http://diflucan.icu/# cost of diflucan prescription in mexico

# diflucan 150 australia 2024/04/15 6:55 Josephfep
https://prednisonea.store/# over the counter prednisone pills

# buy cytotec in usa https://cytotec.club/ Cytotec 200mcg price 2024/04/28 2:05 Cytotec
buy cytotec in usa https://cytotec.club/ Cytotec 200mcg price

Post Feedback

タイトル
名前
Url:
コメント