caret ( ^ ) داخل مجموعة character set لإنشاء مجموعة negated character set [^thingsThatWillNotBeMatched] في النموذج [^thingsThatWillNotBeMatched] . خارج مجموعة character set ، يتم استخدام caret للبحث عن الأنماط في بداية السلاسل. let firstString = "Ricky is first and can be found."؛
let firstRegex = / ^ Ricky /؛
firstRegex.test (firstString)؛
// يعود صحيح
let notFirst = "لا يمكنك العثور على Ricky الآن."؛
firstRegex.test (notFirst)؛
// إرجاع خاطئة
caret في تعبير منطقي للبحث عن "Cal" فقط في بداية السلسلة rickyAndCal . "Cal" بحرف كبير.
    testString: 'assert(calRegex.source == "^Cal", "Your regex should search for "Cal" with a capital letter.");'
  - text: يجب ألا يستخدم تعبيرك المعتاد أي أعلام.
    testString: 'assert(calRegex.flags == "", "Your regex should not use any flags.");'
  - text: يجب أن يتطابق تعبيرك العادي مع كلمة "Cal" في بداية السلسلة.
    testString: 'assert(calRegex.test("Cal and Ricky both like racing."), "Your regex should match "Cal" at the beginning of the string.");'
  - text: يجب ألا يتطابق التعبير العادي مع "Cal" في وسط سلسلة.
    testString: 'assert(!calRegex.test("Ricky and Cal both like racing."), "Your regex should not match "Cal" in the middle of a string.");'
```