I have a sample string below:
var nodeTest = "<node1>xxxxxxx<x> xxx</node1>xxx xx</x>x x x xxxxxx <node2>xx x x xxxxxxxxxx</node2> xxxxx";
I am trying to match all nodes with and without white spaces so anything (numbers, white space, text and all characters - think everything!) between <> including <>. I have tried many configurations but they don't seem to work intuitively, my most recent bit of logic being this:
var nodePairs = nodeTest.match(/<(.*)>/gi);
But it matches the ENTIRE test string. Can anyone offer any clues as to where I might be going wrong? Thanks!