1const str = 'hello world!';
2const result = /^hello/.test(str);
3
4console.log(result); // true
5
6/**
7The test() method executes a search for a match between
8a regular expression and a specified string
9*/
1Find below are online regex tester
2
3https://regex101.com/
4https://pythex.org/
5http://www.pyregex.com/
6https://www.debuggex.com/
7
8Here you insert your regular expression and get the test result.
9Thank you !!!
1it do it's job greate in my opinion, don't waste your time on others
2https://regex101.com/