regex = function regex(needle, hay) {
        var i = 0,
          results = [],
          latest, regexp = new RegExp(needle, "g");
        latest = results[i] = regexp.exec(hay);
        while (latest) {
          i++;
          latest = results[i] = regexp.exec(hay);
        }
        return results;
      }
Sets the way text draws to the screen. In the default configuration (the MODEL mode), it's possible to rotate,
scale, and place letters in two and three dimensional space. <br /><br /> Changing to SCREEN mode draws letters
directly to the front of the window and greatly increases rendering quality and speed when used with the P2D and
P3D renderers. textMode(SCREEN) with OPENGL and JAVA2D (the default) renderers will generally be slower, though
pixel accurate with P2D and P3D. With textMode(SCREEN), the letters draw at the actual size of the font (in pixels)
and therefore calls to <b>textSize()</b> will not affect the size of the letters. To create a font at the size you
desire, use the "Create font..." option in the Tools menu, or use the createFont() function. When using textMode(SCREEN),
any z-coordinate passed to a text() command will be ignored, because your computer screen is...flat!

@param {int} MODE Either MODEL, SCREEN or SHAPE (not yet supported)

@see loadFont
@see PFont
@see text
@see textFont
@see createFont