更新时间:2023-01-16 11:16:08
我认为使用函数哪个会给您这些结果:
alphaStr = 'hjbni'
digitStr = '1242343'
otherStr = '&&(*&'
如果您真的想使用 REGEXP ,这是您的操作方式:
If you really wanted to use REGEXP, this is how you could do it:
matches = regexp(str,{'[a-zA-Z]','\d','[^a-zA-Z\d]'},'match');
alphaStr = [matches{1}{:}];
digitStr = [matches{2}{:}];
otherStr = [matches{3}{:}];