Regular expression syntax
Start assertion
Asserts start of input or, with m, a line start without consuming text.
Formal Syntax & Structure
javascript syntaxjavascript
^Working Example
Example Snippetjavascript
console.log(/^a/.test("ba"));Asserts start of input or, with m, a line start without consuming text.
^console.log(/^a/.test("ba"));