Hers is the Python approach for the same
# Compiled by Amol Shah, August 2020
# @AmolShah1103
import clr
clr.AddReference('ProtoGeometry')
from Autodesk.DesignScript.Geometry import *
import re
regx = re.compile(r'((?:-)?\d+\.\d+)').findall
out = []
for str in IN[0]:
line = Line.ByStartPointEndPoint(Point.ByCoordinates(float(regx(str)[0]),float(regx(str)[1]),float(regx(str)[2])),Point.ByCoordinates(float(regx(str)[3]),float(regx(str)[4]),float(regx(str)[5])))
out.append(line)
OUT = out
