<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="jit.str.regexp" module="jit" category="Jitter Strings">
	<digest>
		Use PERL-compatible regular expressions on Jitter matrices
	</digest>
	<description>
		<o>jit.str.regexp</o> performs regular expression analysis to Jitter matrices with optional substitution.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Jitter
		</metadata>
		<metadata name="tag">
			Jitter Strings
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="matrix">
			<digest>
				in
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="matrix">
			<digest>
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="matrix">
			<digest>
				descriptor matrix
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="matrix">
			<digest>
				substitution output
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="matrix">
			<digest>
				backreferences
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="3" type="matrix">
			<digest>
				substrings
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="4" type="matrix">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--MOP-->
	<mop matrixinputcount="1" matrixoutputcount="4">
		<matrixoutput name="out" planelink="1" typelink="1" dimlink="1" minplanecount="1" maxplanecount="1" mindimcount="1" maxdimcount="32">
			<types>
				char
			</types>
		</matrixoutput>
		<matrixoutput name="out2" planelink="1" typelink="1" dimlink="1" minplanecount="1" maxplanecount="1" mindimcount="1" maxdimcount="32">
			<types>
				char
			</types>
		</matrixoutput>
		<matrixoutput name="out3" planelink="1" typelink="1" dimlink="1" minplanecount="1" maxplanecount="1" mindimcount="1" maxdimcount="32">
			<types>
				char
			</types>
		</matrixoutput>
		<matrixoutput name="out4" planelink="1" typelink="1" dimlink="1" minplanecount="1" maxplanecount="1" mindimcount="1" maxdimcount="32">
			<types>
				char
			</types>
		</matrixoutput>
	</mop>
	<!--MESSAGES-->
	<jittermethodlist>
		<jittermethod name="bang" />
		<jittermethod name="clear" />
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="jit_matrix" />
		<jittermethod name="importattrs" />
		<jittermethod name="outputmatrix" />
		<jittermethod name="summary" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="descriptor" get="1" set="1" type="int" size="1">
			<digest>
				Output descriptor matrix flag
			</digest>
			<description>
				Output descriptor matrix flag (default = 0)
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Descriptor" />
			</attributelist>
		</attribute>
		<attribute name="re" get="1" set="1" type="symbol" size="1">
			<digest>
				Regular expression for analysis
			</digest>
			<description>
				The PERL-compatible regular expression to be used by <o>jit.str.regexp</o> for analysis of the incoming matrix.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Regular Expression" />
			</attributelist>
		</attribute>
		<attribute name="substitute" get="1" set="1" type="symbol" size="1">
			<digest>
				Substitution string
			</digest>
			<description>
				A substitution string.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Substitute" />
			</attributelist>
		</attribute>
	</attributelist>
	<jitterattributelist>
		<jitterattribute name="outputmode" />
		<jitterattribute name="adapt" />
		<jitterattribute name="out_name" />
		<jitterattribute name="type" />
		<jitterattribute name="dim" />
		<jitterattribute name="planecount" />
		<jitterattribute name="out2_name" />
		<jitterattribute name="out2_type" />
		<jitterattribute name="out2_dim" />
		<jitterattribute name="out2_planecount" />
		<jitterattribute name="out3_name" />
		<jitterattribute name="out3_type" />
		<jitterattribute name="out3_dim" />
		<jitterattribute name="out3_planecount" />
		<jitterattribute name="out4_name" />
		<jitterattribute name="out4_type" />
		<jitterattribute name="out4_dim" />
		<jitterattribute name="out4_planecount" />
	</jitterattributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="jit.str.regexp.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="jit.op">
			Apply binary or unary operators
		</seealso>
		<seealso name="jit.str.fromsymbol">
			Convert Max symbol to Jitter string matrix
		</seealso>
		<seealso name="jit.str.tosymbol">
			Convert Jitter string matrix to Max symbol
		</seealso>
		<seealso name="jit.textfile">
			Read and write a matrix as an ASCII text file
		</seealso>
		<seealso name="regexp" />
	</seealsolist>
	<discussion>
		<p>
			To specify a regular expression, the <at>re</at> attribute is used. Substitutions may be specified with the <at>substitute</at> attribute. A full discussion of regular expressions is beyond the scope of this document, but you can read all about them
			<a href="http://perldoc.perl.org/perlre.html">
				here
			</a>
			and
			<a href="http://www.pcre.org/man.txt">
				here
			</a>
		</p>
		<p>
			<o>jit.str.regexp</o> 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.
		</p>
		<p>
			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).
		</p>
	</discussion>
</c74object>
