我現在有代碼的一個長長的清單如下:記事本++刪除小數位數
<line fill="none" x1="555" y1="562.8181152" x2="542.1015625" y2="579.6394043"/>
<line fill="none" x1="542" y1="579.6394043" x2="527.46875" y2="594.4655762"/>
<line fill="none" x1="527.46875" y1="594.4655762" x2="504" y2="613.9626465"/>
<line fill="none" x1="504" y1="613.9626465" x2="481.9648438" y2="629.4460449"/>
<line fill="none" x1="481" y1="629.4460449" x2="461.6015625" y2="641.6647949"/>
<line fill="none" x1="461" y1="641.6647949" x2="441.1074219" y2="650.2966309"/>
<line fill="none" x1="441" y1="650.2966309" x2="424.0859375" y2="655.7995605"/>
<line fill="none" x1="424" y1="655.7995605" x2="394.5" y2="662.2321777"/>
<line fill="none" x1="394.5" y1="662.2321777" x2="368.8945313" y2="665.0407715"/>
<line fill="none" x1="368" y1="665.0407715" x2="351.0014648" y2="665.6970215"/>
<line fill="none" x1="351" y1="665.6970215" x2="332.1748047" y2="665.3688965"/>
<line fill="none" x1="332" y1="665.3688965" x2="311.1508789" y2="662.2321777"/>
<line fill="none" x1="311" y1="662.2321777" x2="287.7905273" y2="655.7995605"/>
<line fill="none" x1="287" y1="655.7995605" x2="267.5742188" y2="648.2351074"/>
<line fill="none" x1="267" y1="648.2351074" x2="243.965332" y2="636.6647949"/>
<line fill="none" x1="243.965332" y1="636.6647949" x2="216.9702148" y2="619.0388184"/>
<line fill="none" x1="216" y1="619.0388184" x2="194.0844727" y2="599.3747559"/>
<line fill="none" x1="194" y1="599.3747559" x2="171.9951172" y2="574.7194824"/>
<line fill="none" x1="171" y1="574.7194824" x2="153.3139648" y2="547.5153809"/>
<line fill="none" x1="153" y1="547.5153809" x2="137.4921875" y2="517.0036621"/>
由於這種被渲染在移動設備上的SVG這需要去除小數與離開它例如
<line fill="none" x1="153" y1="547" x2="137" y2="517"/>
,而不是
<line fill="none" x1="153" y1="547.5153809" x2="137.4921875" y2="517.0036621"/>
我知道這是可能通過正則表達式但是我在不同的例子中查看了一下stackoverflow,但是我永遠無法理解正則表達式。任何幫助表示讚賞!