2
所有字符串
我有以下字符串:獲得2個字符之間
"The length must be between <xmin> and <xmax> characters"
我試圖讓所有的單詞/字符串是<>
之間,但我的代碼我只得到如下:
xmin> and <xmax
這是我的代碼:
var srctext = "The length must be between <xmin> and <xmax> characters";
var re = srctext.match(/\<(.*)\>/).pop();
console.log(re);
我怎麼能得到xmin
和xmax
?
哦,等等。你是對的。 –