Created
August 17, 2023 16:37
-
-
Save suhailgupta03/ec26d981a1b8b6ad75b5622a1482ef8e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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