請高手幫幫忙~多謝!
有個文字檔內容如下:
CONTOUR, positive, HOLES_NUM = 0
FROM, 69695, 4365
LINETO, 69695, 2341
LINETO, 41828, 2341
LINETO, 41828, 4365
LINETO, 69695, 4365
CONTOUR_END
CONTOUR, positive, HOLES_NUM = 0
FROM, 167837, -16156
LINETO, 167837, -22022
LINETO, 161971, -22022
LINETO, 161971, -16156
LINETO, 167837, -16156
CONTOUR_END
CONTOUR, negative, HOLES_NUM = 0
FROM, 163390, -55531
LINETO, 163390, -55054
LINETO, 165636, -55054
LINETO, 165636, -55531
LINETO, 163390, -55531
CONTOUR_END
已知一個問題字串LINETO, 165636, -55531
請問該如何用perl去過濾
然後得到另一個文字檔,內容如下:
CONTOUR, negative, HOLES_NUM = 0
FROM, 163390, -55531
LINETO, 163390, -55054
LINETO, 165636, -55054
LINETO, 165636, -55531
LINETO, 163390, -55531
CONTOUR_END
[ 本帖最后由 inmolee 于 2008-2-1 14:11 编辑 ] |