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

Re: A simple regexp question

$
0
0
"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <ke9jl5$m9j$1@newscl01ah.mathworks.com>...
> >> 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

Great, thanks!

Viewing all articles
Browse latest Browse all 19628

Trending Articles