comparison scripts/plot/__go_draw_axes__.m @ 12462:e4dbfe3019b1

Use PCRE regular expressions throughout Octave.
author Rik <octave@nomad.inbox5.com>
date Sat, 19 Feb 2011 18:21:58 -0800
parents 7c60b2bd7f39
children bedd0cdb3584
comparison
equal deleted inserted replaced
12461:cc14943e6254 12462:e4dbfe3019b1
2324 2324
2325 endfunction 2325 endfunction
2326 2326
2327 function l = length_string (s) 2327 function l = length_string (s)
2328 l = length (s) - length (strfind(s,'{')) - length (strfind(s,'}')); 2328 l = length (s) - length (strfind(s,'{')) - length (strfind(s,'}'));
2329 m = regexp (s, '/([a-zA-Z0-9_-]+|[a-zA-Z0-9_-]+=[0-9]+)', 'matches'); 2329 m = regexp (s, '/([\w-]+|[\w-]+=\d+)', 'matches');
2330 if (!isempty (m)) 2330 if (!isempty (m))
2331 l = l - sum (cellfun (@length, m)); 2331 l = l - sum (cellfun (@length, m));
2332 endif 2332 endif
2333 endfunction 2333 endfunction
2334 2334