title: How do I select all nodes using XPath 'matches' in C#?
body: <p>I know that a similar question may exist, but I can't find the answers how to solve the problem with using <code>regex</code> in <code>XPath</code> string in the <code>XmlNode.SelectNodes</code> method in <code>C#</code>.</p>
  
  <p>I need to select all nodes where an attribute value matches with <code>regex</code>. I'm trying to use <code>matches</code> function, like this:</p>
  
  <pre><code>filtered_nodes = xml_node.SelectNodes("./*[matches(@Name, '*')]");
  </code></pre>
  
  <p>but anyway I get the <code>System.Xml.XPath.XPathException</code>.</p>
  
  <p>I'm using <code>MS VS 2012</code> with <code>XPath 2.0</code> (at least I think so).</p>
  
  <p>How to use <code>matches</code> in my case?</p>