<cfoutput>
	<h3>Functions</h3>

	<p>The latest v0.7 release of jre-utils supports the following functions:

	<a href="##func_init">init</a>
	, <a href="##func_get">get</a>
	, <a href="##func_getfirst">getFirst</a>
	, <a href="##func_getgroups">getGroups</a>
	, <a href="##func_match">match</a>
	, <a href="##func_matchfirst">matchFirst</a>
	, <a href="##func_matchgroups">matchGroups</a>
	, <a href="##func_matches">matches</a>
	, <a href="##func_replace">replace</a>
	, <a href="##func_split">split</a>.</p>

	<p>The get* and match* groups are identical functions with different argument orders.
	The get* functions are consistent with rereplace, whilst the match* use the order of rematch.</p>

	<p>Most functions also have a *NoCase equivalent - for those that do not, use the (?i) embedded expression.</p>

	<br/>

	<h4 id="func_init">init</h4>
	<p>Initialises the component, sets up configuration options.</p>

		<h5 id="args_init">ARGUMENTS</h5>
		<dl class="arguments">

			<dt>DefaultFlags</dt>
			<dd>Optional, String list, default 'MULTILINE'</dd><dd>Any <a href="##flags">flags</a> that apply by default.</dd>

			<dt>IgnoreInvalidFlags</dt>
			<dd>Optional, Boolean, default false</dd><dd>If true, ignores invalid flags, instead of throwing an error.</dd>

			<dt>BackslashReferences</dt>
			<dd>Optional, Boolean, default false</dd><dd>Allows you to use \1 instead of $1 in backreferences.</dd>

			<dt>SetNullGroupsBlank</dt>
			<dd>Optional, Boolean, default true</dd><dd>When returning backreferences, groups with no value are set to empty string if true, or left as null if false.</dd>

		</dl>


	<br/>

	<h4 id="func_get">get</h4>
	<p>Returns an array of matches to the supplied RegEx.</p>

		<h5 id="args_get">ARGUMENTS</h5>
		<dl class="arguments">

			<dt>Text</dt>
			<dd>String</dd><dd>Text to look for matches in.</dd>

			<dt>Regex</dt>
			<dd>String regular expression</dd><dd>Expression used to find match.</dd>

			<dt>Flags</dt>
			<dd>Optional, String list, default <a href="##args_init">DefaultFlags</a></dd><dd>Any <a href="##flags">flags</a> to apply to matching.</dd>

		</dl>


	<br/>

	<h4 id="func_getnocase">getNoCase</h4>
	<p>Exactly the same as <a href="##func_get">get</a>, but with CASE_INSENSITIVE flag enabled.</p>

	<br/>

	<h4 id="func_getfirst">getFirst</h4>
	<p>This is a shortcut for <a href="##get">get</a>, that returns only the first result, or blank if no matches.</p>

	<br/>

	<h4 id="func_getfirstnocase">getFirstNoCase</h4>
	<p>Exactly the same as <a href="##func_getFirst">getFirst</a>, but with CASE_INSENSITIVE flag enabled.</p>

	<br/>

	<h4 id="func_getgroups">getGroups</h4>
	<p>Returns an array of structs. Each struct contains string 'match' for that result, and array 'groups' for backreferences.</p>

		<h5 id="args_getgroups">ARGUMENTS</h5>
		<dl class="arguments">

			<dt>Text</dt>
			<dd>String</dd><dd>Text to look for matches in.</dd>

			<dt>Regex</dt>
			<dd>String regular expression</dd><dd>Expression used to find match.</dd>

			<dt>SetNullGroupsBlank</dt>
			<dd>Optional, Boolean, default true (see <a href="##args_init">SetNullGroupsBlank</a>)</dd><dd>If true, groups with no values are set to blank, otherwise they are null.</dd>

			<dt>Flags</dt>
			<dd>Optional, String list, default <a href="##args_init">DefaultFlags</a></dd><dd>Any <a href="##flags">flags</a> to apply to matching.</dd>

		</dl>


	<br/>

	<h4 id="func_match">match</h4>
	<p>This is an alias of <a href="##get">get</a> but with argument order changed to be consistent with rematch CFML function.</p>

	<br/>

	<h4 id="func_matchnocase">matchNoCase</h4>
	<p>Exactly the same as <a href="##func_match">match</a>, but with CASE_INSENSITIVE flag enabled.</p>

	<br/>

	<h4 id="func_matchfirst">matchFirst</h4>
	<p>This is an alias of <a href="##getFirst">getFirst</a> but with argument order changed to be consistent with rematch CFML function.</p>

	<br/>

	<h4 id="func_matchfirstnocase">matchFirstNoCase</h4>
	<p>Exactly the same as <a href="##func_matchFirst">matchFirst</a>, but with CASE_INSENSITIVE flag enabled.</p>

	<br/>

	<h4 id="func_matchgroups">matchGroups</h4>
	<p>This is an alias of <a href="##getGroups">getGroups</a> but with argument order changed to be consistent with rematch CFML function.</p>

	<br/>

	<h4 id="func_matchgroupsnocase">matchGroupsNoCase</h4>
	<p>Exactly the same as <a href="##func_matchGroups">matchGroups</a>, but with CASE_INSENSITIVE flag enabled.</p>

	<br/>

	<h4 id="func_matches">matches</h4>
	<p>Returns true if the RegEx produced any matches, false otherwise.</p>

		<h5 id="args_matches">ARGUMENTS</h5>
		<dl class="arguments">

			<dt>Text</dt>
			<dd>String</dd><dd>Text to look for matches in.</dd>

			<dt>Regex</dt>
			<dd>String regular expression</dd><dd>Expression used to find match.</dd>

			<dt>Flags</dt>
			<dd>Optional, String list, default <a href="##DefaultFlags">DefaultFlags</a></dd><dd>Any flags to apply to matching.</dd>

		</dl>


	<br/>

	<h4 id="func_matchesnocase">matchesNoCase</h4>
	<p>Exactly the same as <a href="##func_matches">matches</a>, but with CASE_INSENSITIVE flag enabled.</p>

	<br/>

	<h4 id="func_replace">replace</h4>
	<p>Replaces matches to the regex with Replacement (text or function).</p><p>NOTE: For simple replacing, consider Text.replaceFirst(Regex,Replacement) or Text.replaceAll(Regex,Replacement) instead.</p>

		<h5 id="args_replace">ARGUMENTS</h5>
		<dl class="arguments">

			<dt>Text</dt>
			<dd>String</dd><dd>Text to use as replacement source.</dd>

			<dt>Regex</dt>
			<dd>String regular expression</dd><dd>Expression used to match replacements.</dd>

			<dt>Replacement</dt>
			<dd>String or UDF</dd><dd>String to replace each match with;</dd><dd>or</dd><dd>User-Defined Function to apply to each match. (See Callback Example for details.)</dd>

			<dt>Scope</dt>
			<dd>String, optional, default 'ONE'</dd><dd>Determines if first match or all matches should be replaced. ONE or ALL</dd>

		</dl>


	<br/>

	<h4 id="func_split">split</h4>
	<p>Splits the supplied text into an array using the supplied regex as delimiter.</p><p>NOTE: If you're not using the flags, it's faster to do Text.split(Regex) instead.</p>

		<h5 id="args_split">ARGUMENTS</h5>
		<dl class="arguments">

			<dt>Text</dt>
			<dd>String</dd><dd>Input text to split into parts.</dd>

			<dt>Regex</dt>
			<dd>String regular expression</dd><dd>Expression used to split text.</dd>

			<dt>Flags</dt>
			<dd>Optional, String list, default <a href="##DefaultFlags">DefaultFlags</a></dd><dd>Any flags to apply to matching.</dd>

		</dl>


	<br/>

	<h4 id="func_splitnocase">splitNoCase</h4>
	<p>Exactly the same as <a href="##func_split">split</a>, but with CASE_INSENSITIVE flag enabled.</p>

	<br/>








	<script type="text/javascript">
		$j('h5:contains(ARGUMENTS)').click
			( function() { $j(this).next('.arguments').toggle(50); } );

		$j('h5:contains(ARGUMENTS)').css('cursor','pointer');

		$j('.arguments').hide();
	</script>

</cfoutput>