本帖最后由 holley 于 2022-12-6 16:51 编辑
来源:Regex Golf (alf.nu)
示例:
需匹配:allochirally
anticovenanting
barbary
calelectrical
entablement
ethanethiol
froufrou
furfuryl
galagala
heavyheaded
linguatuline
mathematic
monoammonium
perpera
photophonic
purpuraceous
salpingonasal
testes
trisectrix
undergrounder
untaunted
需排除:anticker
corundum
crabcatcher
damnably
foxtailed
galvanotactic
gummage
gurniad
hypergoddess
kashga
nonimitative
parsonage
pouchlike
presumptuously
pylar
rachioparalysis
scherzando
swayed
unbridledness
unupbraidingly
wellside
个人研究了一下规律,大致是需匹配字符串中:前3个小写字母会重复出现2次 ,而需排除字符串中只有1个或2个小写字母重复的情况
我使用正则表达式为:只能匹配到连续的重复字符串,求助高手帮忙改良一下~~~
之前只能匹配到5个,改为这样可以匹配7个了 |