You'll probably want to rework your loop:
List<Double> list = new ArrayList<Double>()
while ( search.find() ) {
list.add( Double.parseDouble(search.group(1)) )
}
if you want it as an array, then
double x[] = list.toArray();
Also if you System.out.println( x )
you're going to get something like [D@116ab4e
, which essentially means "array of double" ([D
) followed by the hashcode of your array object. You'll probably want to
for ( i=0; i<x.length; i++ ) { System.out.println( x[ i ] ); }
Cheers,