怎样判断字符串是否是双拼?
比如说:
alie //是
aliex //不是
olai //是
olain //不是
oupai //是
onpai //不是
eiyuan //是
eilo //不是
yolai //是
yoei //是
当然我有单拼列表,问题是怎样筛选。不懂编程的人没思路更不懂下手,可以付费.......
单拼列表:
<code>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</code>
回复内容:
比如说:
alie //是
aliex //不是
olai //是
olain //不是
oupai //是
onpai //不是
eiyuan //是
eilo //不是
yolai //是
yoei //是
当然我有单拼列表,问题是怎样筛选。不懂编程的人没思路更不懂下手,可以付费.......
单拼列表:
<code>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</code>
通过请教很多高手,基本上能使用了.
$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)|(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)){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);
?>

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Validator can be created by adding the following two lines in the controller.
