I wish to grab the non-zero coefficients of a particular number arrangement. I have the set of numbers below and I wish to strictly extract with regex the non-zero coefficient (
x1 *0.000000+ x2 *-0.100000+ x3 *0.850000+ x4 *0.000000+ x5 *0.000056+ x6 *0.000000
Match x-digit not followed by space-star-zero-dot-zeroes-endOfWord:
See live demo.