A newer version of Max is available. Click here to access the latest version of this document.


Use PERL-compatible regular expressions on Jitter matrices


The jit.str.regexp object performs regular expression analysis to Jitter matrices, with optional substitution. To specify a regular expression, the re attribute is used. Substitutions may be specified with the substitute attribute. A full discussion of regular expressions is beyond the scope of this document, but you can read all about them here and here .

jit.str.regexp gets its regular expression know-how from the PCRE library package, which is open source software, written by Philip Hazel, and copyright by the University of Cambridge, England.

A word on Jitter strings: In Jitter, any 1 plane char matrix may be manipulated as a string. String matrices may have one or two dimensions. If 1-dimensional, the string is considered terminated at the first 0 (like in C). If 2-dimensional, the string may be considered a multi-line string, with the first 0 encountered on each row treated as a carriage return. The jit.textfile and jit.str.op objects will accept and output 2D matrices. jit.str.fromsymbol only outputs 1D matrices and jit.str.tosymbol only accepts 1D matrices (or the first row of a 2D matrix).

Matrix Operator

matrix inputs:1, matrix outputs:4
Name IOProc Planelink Typelink Dimlink Plane Dim Type
out n/a 1 1 1 1 1 char
out2 n/a 1 1 1 1 1 char
out3 n/a 1 1 1 1 1 char
out4 n/a 1 1 1 1 1 char

Information for Jitter Matrix Operator (MOP) messages and attributes to this object


Name Type g/s Description
descriptor int Output descriptor matrix flag (default = 0)
re symbol The PERL-compatible regular expression to be used by jit.str.regexp for analysis of the incoming matrix.
substitute symbol A substitution string.

Information for box attributes common to all objects


See Also

Name Description
jit.op Apply binary or unary operators
jit.str.fromsymbol Convert Max symbol to Jitter string matrix
jit.str.tosymbol Convert Jitter string matrix to Max symbol
jit.textfile Read and write a matrix as an ASCII text file
regexp Use PERL-style regular expressions to process input