<?xml version="1.0" encoding="UTF-8"?><api:function-page xml:base="/apidoc/8.0/fn.matches.xml" generated="2015-10-07T16:36:00.016766-07:00" mode="javascript" xmlns:api="http://marklogic.com/rundmc/api"><api:function-name>fn.matches</api:function-name><api:suggest>fn.matches</api:suggest><api:suggest>fn</api:suggest><api:suggest>matches</api:suggest><api:function-link mode="xquery" fullname="fn:matches">/apidoc/8.0/fn:matches.xml</api:function-link><api:function mode="javascript" name="matches" type="builtin" lib="fn" category="StringBuiltins" bucket="W3C-Standard Functions" hidden="false" prefix="fn" namespace="http://www.w3.org/2005/xpath-functions" fullname="fn.matches"><api:summary>
Returns <code xmlns="http://www.w3.org/1999/xhtml">true</code> if the specified $input matches the specified
$pattern, otherwise returns <code xmlns="http://www.w3.org/1999/xhtml">false</code>.
</api:summary><api:params><api:param name="input" type="xs:string?"><api:param-description>
  The input from which to match.
  </api:param-description><api:param-name>input</api:param-name><api:param-type>String?</api:param-type></api:param><api:param name="pattern" type="xs:string"><api:param-description>
  The regular expression to match.
  </api:param-description><api:param-name>pattern</api:param-name><api:param-type>String</api:param-type></api:param><api:param name="flags" type="xs:string" optional="true"><api:param-description>
  The flag representing how to interpret the regular expression. One of
  "s", "m", "i", or "x", as defined in
  <a href="http://www.w3.org/TR/xpath-functions/#flags" xmlns="http://www.w3.org/1999/xhtml">http://www.w3.org/TR/xpath-functions/#flags</a>.
  </api:param-description><api:param-name>flags</api:param-name><api:param-type>String</api:param-type></api:param></api:params><api:return>Boolean?</api:return><api:example class="javascript"><pre xml:space="preserve" xmlns="http://www.w3.org/1999/xhtml">
fn.matches("this is a string", "is");

=&gt; true

fn.matches("this is a string", "zoo");

=&gt; false
</pre>
</api:example></api:function></api:function-page>