I am trying to find two values which are in the following format where I have two numbers of indeterminate length separated by a space.
<div name='something'>123 456</div><other HTML...> </other HTML>
Using the unique name='something'
I want to know what the first number and second numbers are.
I am doing the following
var xhack = arraytrans.match("<div name='something'>(.*)</div>");
var values = xhack[1];
var z_value = values.split(' ')[0];
var x_value = values.split(' ')[1];
However this results in scenarios where the x value ends up being a bunch of trailing HTML from <other HTML>
.
Any ideas what the right regex is to get x and z values here?