Skip to content

Instantly share code, notes, and snippets.

@suhailgupta03
Created August 17, 2023 16:37
Show Gist options
  • Save suhailgupta03/ec26d981a1b8b6ad75b5622a1482ef8e to your computer and use it in GitHub Desktop.
Save suhailgupta03/ec26d981a1b8b6ad75b5622a1482ef8e to your computer and use it in GitHub Desktop.
let string = `Hi! Recently India celebrated its Independence Day`
let pattern = /^Hi.*Day$/g
// .* means any character any number of times
// * means 0 or more times
console.log(pattern.test(string))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment