| 查看: 434 | 回复: 0 | ||
100403140212木虫 (正式写手)
超级水晶虫
|
[求助]
matlab字符串的查找问题
|
|
各位大神问题如下(注:源自http://blog.csdn.net/mathsoperator/article/details/7232334) poestr = ['while I nodded, nearly napping, ' 'suddenly there came a tapping,']; 1)原作者regexp(poestr, '(?<nonwhitechar>\S)\k<nonwhitechar>', 'match') 运算结果ans = 'dd' 'pp' 'dd' 'pp' 2)我将程序稍作修改,poestr = ['while I nodded, nearly napping, ' 'suddenly there came a tapping,']; regexp(poestr, '(?<nonwhitechar>\S).*\k<nonwhitechar>', 'match') 运算结果ans = 'hile I nodded, n...' 'ere came' 'a ta' 'pp' 请问为什么2)中运行结果,为第一个单词为啥不是while而是hile? |
» 猜你喜欢
287求调剂
已经有5人回复
22408 344分 求调剂 一志愿 华电计算机技术
已经有3人回复
289求调剂
已经有3人回复
317求调剂
已经有10人回复
广西大学家禽遗传育种课题组2026年硕士招生(接收计算机专业调剂)
已经有3人回复
学校已经提交到NSFC,还能修改吗?
已经有8人回复
08工学调剂
已经有5人回复
281求调剂(0805)
已经有25人回复
085600材料与化工
已经有6人回复
265求调剂
已经有8人回复














回复此楼
10