Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript regex match character from a set of characters

// Regex - Any character from a set of characters
console.log(/[0123456789]/.test("in 1992")); // true
console.log(/[0-9]/.test("in 1992")); // true
console.log(/[abc]/.test("def")); // false
console.log(/[abc]/.test("cdef")); // true
Comment

PREVIOUS NEXT
Code Example
Javascript :: create javascript array with 1 value 
Javascript :: js sort by two numeric fields 
Javascript :: what difference between react func and class components 
Javascript :: vuelidate required if another props 
Javascript :: react router changing url but not rendering 
Javascript :: text background fabricjs 
Javascript :: make a bot send a welcome message discordjs 
Javascript :: try catch javascript 
Javascript :: how to select a class and then change the children of that class with javascript 
Javascript :: array javascript 
Javascript :: how to read files in node 
Javascript :: collapse in angular 4 
Javascript :: how to use mongoose-encryption 
Javascript :: how to make button in react js 
Javascript :: setImmediate() nodejs 
Javascript :: entypo icons react native 
Javascript :: jquery if else 
Javascript :: super class js 
Javascript :: es6 spread 
Javascript :: add background image react native 
Javascript :: delay javascript 
Javascript :: update a certain key in dictionary javascript 
Javascript :: legend on click use default chartjs 
Javascript :: Function is not defined - Uncaught ReferenceError 
Javascript :: manually fire event using javascript 
Javascript :: node js documentation 
Javascript :: react native generate stylesheet with function 
Javascript :: filereader reactjs 
Javascript :: node js log colors 
Javascript :: javascript array loop 
ADD CONTENT
Topic
Content
Source link
Name
5+4 =