Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

Re: A simple regexp question

$
0
0
>> s = '000 first cx=123, second cx=12345,...'

s =

000 first cx=123, second cx=12345,...


>> c = regexp(s,'cx=(\d*)','tokens')

c =

    {1x1 cell} {1x1 cell}


>> cellfun(@str2double, c)

ans =

         123 12345

% Bruno

Viewing all articles
Browse latest Browse all 19628

Trending Articles