How can I determine whether a string is a double fight?

Source: Internet
Author: User
For example, alie is aliex, olai is olain, oupai is onpai, eiyuan is eilo, yolai is yoei, and of course I have a single list. The question is how to filter. People who do not know programming have no idea, but do not know how to do it. They can pay for it... for example:

Alie // Yes
Aliex // No

Olai // Yes
Olain // No

Oupai // Yes
Onpai // No

Eiyuan // Yes
Eilo // No

Yolai // Yes
Yoei // Yes

Of course, I have a single list, and the question is how to filter. People who do not know programming have no idea, but do not know how to do it. They can pay for it .......
Single fight list:

a ai an ang ao ba bai ban bang bao bei ben beng bi bian biao bie bin bing bo bu ca cai can cang cao ce cen ceng cha chai chan chang chao che chen cheng chi chong chou chu chua chuai chuan chuang chui chun chuo ci cong cou cu cuan cui cun cuo da dai dan dang dao de den dei deng di dia dian diao die ding diu dong dou du duan dui dun duo e ei en eng er fa fan fang fei fen feng fo fou fu ga gai gan gang gao ge gei gen geng gong gou gu gua guai guan guang gui gun guo ha hai han hang hao he hei hen heng hong hou hu hua huai huan huang hui hun huo ji jia jian jiang jiao jie jin jing jiong jiu ju juan jue jun ka kai kan kang kao ke ken keng kong kou ku kua kuai kuan kuang kui kun kuo la lai lan lang lao le lei leng li lia lian liang liao lie lin ling liu long lou lu luan lue lun luo ma mai man mang mao me mei men meng mi mian miao mie min ming miu mo mou mu na nai nan nang nao ne nei nen neng ni nian niang niao nie nin ning niu nong nou nu nuan nuo nun o ou pa pai pan pang pao pei pen peng pi pian piao pie pin ping po pou pu qi qia qian qiang qiao qie qin qing qiong qiu qu quan que qun ran rang rao re ren reng ri rong rou ru ruan rui run ruo sa sai san sang sao se sen seng sha shai shan shang shao she shei shen sheng shi shou shu shua shuai shuan shuang shui shun shuo si song sou su suan sui sun suo ta tai tan tang tao te teng ti tian tiao tie ting tong tou tu tuan tui tun tuo wa wai wan wang wei wen weng wo wu xi xia xian xiang xiao xie xin xing xiong xiu xu xuan xue xun ya yan yang yao ye yi yin ying yo yong you yu yuan yue yun za zai zan zang zao ze zei zen zeng zha zhai zhan zhang zhao zhe zhei zhen zheng zhi zhong zhou zhu zhua zhuai zhuan zhuang zhui zhun zhuo zi zong zou zu zuan zui zun zuo

Reply content:

For example:

Alie // Yes
Aliex // No

Olai // Yes
Olain // No

Oupai // Yes
Onpai // No

Eiyuan // Yes
Eilo // No

Yolai // Yes
Yoei // Yes

Of course, I have a single list, and the question is how to filter. People who do not know programming have no idea, but do not know how to do it. They can pay for it .......
Single fight list:

a ai an ang ao ba bai ban bang bao bei ben beng bi bian biao bie bin bing bo bu ca cai can cang cao ce cen ceng cha chai chan chang chao che chen cheng chi chong chou chu chua chuai chuan chuang chui chun chuo ci cong cou cu cuan cui cun cuo da dai dan dang dao de den dei deng di dia dian diao die ding diu dong dou du duan dui dun duo e ei en eng er fa fan fang fei fen feng fo fou fu ga gai gan gang gao ge gei gen geng gong gou gu gua guai guan guang gui gun guo ha hai han hang hao he hei hen heng hong hou hu hua huai huan huang hui hun huo ji jia jian jiang jiao jie jin jing jiong jiu ju juan jue jun ka kai kan kang kao ke ken keng kong kou ku kua kuai kuan kuang kui kun kuo la lai lan lang lao le lei leng li lia lian liang liao lie lin ling liu long lou lu luan lue lun luo ma mai man mang mao me mei men meng mi mian miao mie min ming miu mo mou mu na nai nan nang nao ne nei nen neng ni nian niang niao nie nin ning niu nong nou nu nuan nuo nun o ou pa pai pan pang pao pei pen peng pi pian piao pie pin ping po pou pu qi qia qian qiang qiao qie qin qing qiong qiu qu quan que qun ran rang rao re ren reng ri rong rou ru ruan rui run ruo sa sai san sang sao se sen seng sha shai shan shang shao she shei shen sheng shi shou shu shua shuai shuan shuang shui shun shuo si song sou su suan sui sun suo ta tai tan tang tao te teng ti tian tiao tie ting tong tou tu tuan tui tun tuo wa wai wan wang wei wen weng wo wu xi xia xian xiang xiao xie xin xing xiong xiu xu xuan xue xun ya yan yang yao ye yi yin ying yo yong you yu yuan yue yun za zai zan zang zao ze zei zen zeng zha zhai zhan zhang zhao zhe zhei zhen zheng zhi zhong zhou zhu zhua zhuai zhuan zhuang zhui zhun zhuo zi zong zou zu zuan zui zun zuo

By asking a lot of experts, you can basically use it.

$ Pattern = '/^ (a) | (ai) | (an) | (ang) | (ao) | (ba) | (bai) | (ban) | (bang) | (bao) | (bei) | (ben) | (beng) | (bi) | (bian) | (biao) | (bie) | (bin) | (bing) | (bo) | (bu) | (ca) | (cai) | (can) | (cang) | (cao) | (ce) | (cen) | (ceng) | (cha) | (chai) | (chan) | (chang) | (chao) | (che) | (chen) | (cheng) | (chi) | (chong) | (chou) | (chu) | (chua) | (chuai) | (chuan) | (chuang) | (chui) | (chun) | (chuo) | (ci) | (cong) | (cou) | (cu) | (cuan) | (cui) | (cun) | (cuo) | (da) | (dai) | (dan) | (dang) | (dao) | (de) | (den) | (dei) | (deng) | (di) | (dia) | (dian) | (diao) | (die) | (ding) | (diu) | (dong) | (dou) | (du) | (duan) | (dui) | (dun) | (duo) | (e) | (ei) | (en) | (eng) | (er) | (fa) | (fan) | (fang) | (fei) | (fen) | (feng) | (fo) | (fou) | (fu) | (ga) | (gai) | (gan) | (gang) | (gao) | (ge) | (gei) | (gen) | (geng) | (gong) | (gou) | (gu) | (gua) | (guai) | (guan) | (guang) | (gui) | (gun) | (guo) | (ha) | (hai) | (han) | (hang) | (hao) | (he) | (hei) | (hu) | (heng) | (hong) | (hou) | (hu) | (hua) | (huai) | (huan) | (huang) | (hui) | (hun) | (huo) | (ji) | (jia) | (jian) | (jiang) | (jiao) | (jie) | (jin) | (jing) | (jiong) | (jiu) | (ju) | (juan) | (jue) | (jun) | (ka) | (kai) | (kan) | (kang) | (kao) | (ke) | (ken) | (keng) | (kong) | (kou) | (ku) | (kua) | (kuai) | (kuan) | (kuang) | (kui) | (kun) | (kuo) | (la) | (lai) | (lan) | (lang) | (lao) | (le) | (lei) | (leng) | (li) | (lia) | (lian) | (liang) | (liao) | (lie) | (lin) | (ling) | (liu) | (long) | (lou) | (lu) | (luan) | (lue) | (lun) | (luo) | (ma) | (mai) | (man) | (mang) | (mao) | (me) | (mei) | (men) | (meng) | (mi) | (mian) | (miao) | (mie) | (min) | (ming) | (miu) | (mo) | (mou) | (mu) | (na) | (nai) | (nan) | (nang) | (nao) | (ne) | (nei) | (nen) | (neng) | (ni) | (nian) | (niang) | (niao) | (nie) | (nin) | (ning) | (niu) | (nong) | (nou) | (nu) | (nuan) | (nuo) | (nun) | (o) | (ou) | (pa) | (pai) | (pan) | (pang) | (pao) | (pei) | (pen) | (peng) | (pi) | (pian) | (piao) | (pie) | (pin) | (ping) | (po) | (pou) | (pu) | (qi) | (qia) | (qian) | (qiang) | (qiao) | (qie) | (qin) | (qing) | (qiong) | (qiu) | (qu) | (quan) | (que) | (qun) | (ran) | (rang) | (rao) | (re) | (ren) | (reng) | (ri) | (rong) | (rou) | (ru) | (ruan) | (rui) | (run) | (ruo) | (sa) | (sai) | (san) | (sang) | (sao) | (se) | (sen) | (seng) | (sha) | (shai) | (shan) | (shang) | (shao) | (she) | (shei) | (shen) | (sheng) | (shi) | (shou) | (shu) | (shua) | (shuai) | (shuan) | (shuang) | (shui) | (shun) | (shuo) | (si) | (song) | (sou) | (su) | (suan) | (sui) | (sun) | (suo) | (ta) | (tai) | (tan) | (tang) | (tao) | (te) | (teng) | (ti) | (tian) | (tiao) | (tie) | (ting) | (tong) | (tou) | (tu) | (tuan) | (tui) | (tun) | (tuo) | (wa) | (wai) | (wan) | (wang) | (wei) | (wen) | (weng) | (wo) | (wu) | (xi) | (xia) | (xian) | (xiang) | (xiao) | (xie) | (xin) | (xing) | (xiong) | (xiu) | (xu) | (xuan) | (xue) | (xun) | (ya) | (yan) | (yang) | (yao) | (ye) | (yi) | (yin) | (ying) | (yo) | (yong) | (you) | (yu) | (yuan) | (yue) | (yun) | (za) | (zai) | (zan) | (zang) | (zao) | (ze) | (zei) | (zen) | (zeng) | (zha) | (zhai) | (zhan) | (zhang) | (zhao) | (zhe) | (zhei) | (zhen) | (zheng) | (zhi) | (zhong) | (zhou) | (zhu) | (zhua) | (zhuai) | (zhuan) | (zhuang) | (zhui) | (zhun) | (zhuo) | (zi) | (zong) | (zou) | (zu) | (zuan) | (zui) | (zun) | (zuo) {2} $ /';

$ File = file_get_contents ("domain.txt", "r ");
$ Shuangpin = array ();
$ Qita = array ();
$ Lines = explode ("\ n", $ file );
Foreach ($ lines as $ values ){
If (preg_match ($ pattern, $ values )){
$ Shuangpin [] = $ values;
} Else {
$ Qita [] = $ values;
}
}
$ Shuangpin = implode ("\ n", $ shuangpin );
$ Qita = implode ("\ n", $ qita );

File_put_contents('shuangpin.txt ', $ shuangpin );
File_put_contents('qita.txt ', $ qita );
?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.