1
var string = "M-84.1487,-15.8513 a22.4171,22.4171 0 1 0 0,31.7026 h168.2974 a22.4171,22.4171 0 1 0 0,-31.7026 Z";
var regex = "[a-zA-Z][0-9, /-/.]*";
var array = string.match(regex);
誰能幫助我與我的正則表達式匹配個人說明資訊(array[0] == "M-84.1487,-15.8513"; array[1] == "a22.4171,22.4171 0 1 0 0,31.7026";
)正則表達式在JavaScript中匹配SVG路徑數據
非常感謝
謝謝,我會試試這個。變量只是爲了這篇文章而命名:) – Tom 2011-01-13 15:45:30