well, i put xml-response with a lot of symbols, like this:
def xmlString = "<TAG1>1239071ABCDEFGH</TAG1><TAG2>1239071ABCDEFGH</TAG2>"
using xmlSlurper to leave only digits
def node =
new XmlSlurper().parseText(xmlString)
def nodelist = [node.tag1.tag2]
after this "node" got a value like "1239071123907112390711239071" and i try to put java RegExp to separate the digits by 7
System.out.println(java.util.Arrays.toString( nodelist.node.split("(?<=\G.{7})") ))
Where i did wrong? it doesn't work
<TAG1>1239071ABCDEFGH</TAG1><TAG2>1239071ABCDEFGH</TAG2>give you1239071123907112390711239071? Then why are you splitting by 7 chars?def nodelist = [node.tag1.tag2]would return[ null ]<TAG1><TAG2>...<TAGX>tags with same type of content, but i need only digits and separate it by 7 chars to get [1239071 1239071 1239071] etc.