Skip to content

Instantly share code, notes, and snippets.

@suhailgupta03
Created August 17, 2023 16:08
Show Gist options
  • Save suhailgupta03/69929cb1248b66fdf2e8a4a56bdaadac to your computer and use it in GitHub Desktop.
Save suhailgupta03/69929cb1248b66fdf2e8a4a56bdaadac to your computer and use it in GitHub Desktop.
let string = `Hi! Recently India celebrated its
Independence Day.`
let regex = /[izx]/
// [izx] means match any of the characters
// 'i', 'z', or 'x'
console.log(regex.test(string)) // true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment