| 查看: 422 | 回复: 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? |
» 猜你喜欢
实验室接单子
已经有6人回复
假如你的研究生提出不合理要求
已经有11人回复
全日制(定向)博士
已经有5人回复
萌生出自己或许不适合搞科研的想法,现在跑or等等看?
已经有4人回复
Materials Today Chemistry审稿周期
已经有4人回复
参与限项
已经有3人回复
对氯苯硼酸纯化
已经有3人回复
求助:我三月中下旬出站,青基依托单位怎么办?
已经有12人回复
所感
已经有4人回复
要不要辞职读博?
已经有7人回复













回复此楼