5 Replies Latest reply on Oct 8, 2013 11:16 AM by rhauch

    jcr modeshape 3.2.0 getNodes by a name pattern

    fazileh

      Hi,

      I need to get nodes that they are duplicated. like: myNode[2].

      when I get one node by root.getNodes("myNode[2]");   every thing is OK! But Now I want to get all of nodes that have "[2]" in the end of names, I use this root.getNodes("*[2]); I get this exception: (javax.jcr.RepositoryException) javax.jcr.RepositoryException: The "*[2]" name pattern contained the '[' character, which is not allowed in a name pattern

      I searched and I found this page: Chapter 8. Querying and Searching using JCR

      I run the code by unicode character : root.getNodes("*005D"); ]---> 005D, but does not solved.
      I will appreciate if you help me to solve it.

       

      Thank you.