Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript find a digit in str

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.
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: pymongo add json to collection 
Javascript :: UpperCase every first letter in each word in str 
Javascript :: input length material Ui Design 
Javascript :: xhr request 
Javascript :: how to check if browser tab is active javascript 
Javascript :: jquery remove attribute 
Javascript :: javascript from method 
Javascript :: go to top angular 
Javascript :: how to divide array in two parts in js 
Javascript :: swapping elements in an array 
Javascript :: javascript if field exists 
Javascript :: search no of item in array 
Javascript :: how to send a message to a discord server using a bot 
Javascript :: how to get time and date from iso string javascript 
Javascript :: random string js 
Javascript :: jquery json object 
Javascript :: get data from url javascript 
Javascript :: JavaScript Built-in Constructors 
Javascript :: css div at bottom of div 
Javascript :: update node mac to specific version 
Javascript :: reverse a date in javascript 
Javascript :: why do you have to set key prop in react 
Javascript :: throttling function in javascript 
Javascript :: get url params with js 
Javascript :: how get value of json encode in laravel 
Javascript :: javascript onclick to another page div 
Javascript :: merge array no duiplicates js 
Javascript :: JS retrieve a String’s size 
Javascript :: fetch api cors 
Javascript :: localstorage 
ADD CONTENT
Topic
Content
Source link
Name
3+1 =