my @remaining = grep {defined} split / (e\^\(t\+-(\d+\.?\d*|\.\d+)\)) # the special, captured | # or else [+-]+ # filler, not captured /x, $righteq;