JavaScriptの正規表現
2018-03-22 (Thu) · 19 words

JavaScriptの正規表現

str = "S0009";
reg = /^[Ss]+\d{1,4}/

if (str.match(ret)) {
  alert("Match!");
}
alert("No Match!");

デバック方法


Top     back     Posts     Tags     About Me