Extract sub parts of lines