I Caret^
1. The meaning of the character representing the beginning is as follows:/^123$/g.test('123'); //true
2. Use of antisense characters: for example, only Chinese, letters and numbers are matched
/[^ \ u4e00 - \ u9fa5 \ w] / g.test ("mygege @) // true matches @ so it is true
/[^\u4e00-\u9fa5\w]/g.test("mygege ") //false