1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96
|
#N canvas 109 108 780 669 10;
#X declare -path zexy -lib zexy;
#X msg 91 146 symbol a;
#X obj 197 385 print DETAILS;
#X msg 36 144 123;
#X obj 163 242 regex [0-9]*;
#X msg 17 168 5;
#X msg 233 161 regex [a-z];
#X msg 110 165 symbol A;
#X msg 232 187 symbol [A-Z];
#X text 13 108 test cases;
#X text 225 137 regex patterns;
#X msg 496 205 case \$1;
#X obj 496 180 tgl 15 0 empty empty empty 0 -6 0 8 #fcfcfc #000000 #000000 0 1;
#X msg 73 126 symbol abcABC;
#X obj 47 305 print RESULT;
#X floatatom 88 282 5 0 0 0 - - - 0;
#X floatatom 302 261 5 0 0 0 - - - 0;
#N canvas 717 266 494 344 META 0;
#X text 12 195 HELP_PATCH_AUTHORS "pd meta" information added by Jonathan Wilkes for Pd version 0.42.;
#X text 12 25 LICENSE GPL v2;
#X text 12 175 AUTHOR IOhannes m zmoelnig;
#X text 12 45 DESCRIPTION check whether a symbol matches a regular expression;
#X text 12 5 KEYWORDS control;
#X text 12 75 INLET_0 case list regex;
#X text 12 95 INLET_1 symbol;
#X text 12 115 OUTLET_0 float;
#X text 12 135 OUTLET_1 list;
#X text 12 155 OUTLET_2 float;
#X obj 41 244 declare -path zexy -lib zexy;
#X restore 640 16 pd META;
#X text 403 6 part of zexy;
#X obj 67 36 regex;
#X text 124 36 -- check whether a symbol matches a regular expression;
#X text 31 422 list of details:;
#X text 144 587 for more info \, see: http://www.delorie.com/gnu/docs/regex/regex_toc.html;
#X text 54 438 1) ID number of match (in case of multiple matches);
#X text 54 466 3) position of the end of the match (or last character if no match), f 68;
#X text 54 452 2) position of the start of the match (or first character if no match, f 72;
#X obj 17 190 makefilename %d;
#X symbolatom 133 208 10 0 0 0 - - - 0;
#X text 316 164 "regex" message;
#X text 320 187 2nd inlet;
#X text 320 233 argument;
#X text 499 159 case insensitivity;
#X msg 492 238 case 0;
#X text 538 260 ignore upper/lower case when matching;
#X msg 492 259 case 1;
#X symbolatom 232 212 10 0 0 0 - - - 0;
#X obj 47 281 t a a;
#X obj 263 260 t a a;
#X obj 197 314 t l l;
#X listbox 264 314 20 0 0 0 - - - 0;
#X obj 264 336 unpack 0 0 0;
#X floatatom 264 359 2 0 0 0 num - - 0;
#X floatatom 298 359 5 0 0 3 begin - - 0;
#X floatatom 338 359 5 0 0 3 end - - 0;
#X obj 263 286 print NUMBER_OF_MATCHES;
#X obj 551 474 regex ([a-z]+)2\\\\1;
#X obj 551 497 tgl 18 0 empty empty empty 0 -9 0 10 #fcfcfc #000000 #000000 0 1;
#X msg 561 442 symbol bean2bar;
#X msg 551 412 symbol peer2peer;
#X text 558 356 groups and back-references;
#X text 656 411 matches!;
#X text 659 442 does not match;
#X text 538 239 only match exact cases (DEFAULT);
#X text 595 370 groups: ();
#X text 595 387 back-references: \\\\1;
#X connect 0 0 26 0;
#X connect 2 0 25 0;
#X connect 3 0 35 0;
#X connect 3 1 37 0;
#X connect 3 2 36 0;
#X connect 4 0 25 0;
#X connect 5 0 3 0;
#X connect 6 0 26 0;
#X connect 7 0 34 0;
#X connect 10 0 3 0;
#X connect 11 0 10 0;
#X connect 12 0 26 0;
#X connect 25 0 26 0;
#X connect 26 0 3 0;
#X connect 34 0 3 1;
#X connect 35 0 13 0;
#X connect 35 1 14 0;
#X connect 36 0 43 0;
#X connect 36 1 15 0;
#X connect 37 0 1 0;
#X connect 37 1 38 0;
#X connect 38 0 39 0;
#X connect 39 0 40 0;
#X connect 39 1 41 0;
#X connect 39 2 42 0;
#X connect 44 0 45 0;
#X connect 46 0 44 0;
#X connect 47 0 44 0;
|