📌  相关文章
📜  javascript 在 str 中找到一个数字 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:55.093000             🧑  作者: Mango

代码示例1
var regex = /\d+/g;
var string = "Any string you want!";
var matches = string.match(regex);  // creates array from matches

if (matches){
  // There is a digit in the string.
} else {
  // No Digits found in the string.
}