"A"
و "B"
و "C"
. أمثلة من الأحرف الصغيرة هي "a"
و "b"
و "c"
. يمكنك مطابقة الحالتين باستخدام ما يسمى بعلم. هناك علامات أخرى ولكن هنا سوف تركز على العلم الذي يتجاهل القضية - العلم i
. يمكنك استخدامه عن طريق إلحاقه بالتعبير المعتاد. مثال على استخدام هذه العلامة هو /ignorecase/i
. يمكن أن يتطابق هذا التعبير المعتاد مع الجمل "ignorecase"
و "igNoreCase"
و "IgnoreCase"
. fccRegex
regex لمطابقة "freeCodeCamp"
، بغض النظر عن قضيته. يجب ألا يتطابق تعبيرك العادي مع أي اختصارات أو اختلافات في المساحات. freeCodeCamp
العادي مع freeCodeCamp
testString: 'assert(fccRegex.test("freeCodeCamp"), "Your regex should match freeCodeCamp
");'
- text: يجب أن يتطابق FreeCodeCamp
العادي مع FreeCodeCamp
testString: 'assert(fccRegex.test("FreeCodeCamp"), "Your regex should match FreeCodeCamp
");'
- text: يجب أن يتطابق FreecodeCamp
العادي مع FreecodeCamp
testString: 'assert(fccRegex.test("FreecodeCamp"), "Your regex should match FreecodeCamp
");'
- text: يجب أن يتطابق FreeCodecamp
العادي مع FreeCodecamp
testString: 'assert(fccRegex.test("FreeCodecamp"), "Your regex should match FreeCodecamp
");'
- text: يجب ألا يتطابق تعبيرك العادي مع Free Code Camp
testString: 'assert(!fccRegex.test("Free Code Camp"), "Your regex should not match Free Code Camp
");'
- text: يجب أن يتطابق FreeCOdeCamp
العادي مع FreeCOdeCamp
testString: 'assert(fccRegex.test("FreeCOdeCamp"), "Your regex should match FreeCOdeCamp
");'
- text: يجب ألا يتطابق تعبيرك العادي مع FCC
testString: 'assert(!fccRegex.test("FCC"), "Your regex should not match FCC
");'
- text: يجب أن يتطابق FrEeCoDeCamp
العادي مع FrEeCoDeCamp
testString: 'assert(fccRegex.test("FrEeCoDeCamp"), "Your regex should match FrEeCoDeCamp
");'
- text: يجب أن يتطابق FrEeCodECamp
العادي مع FrEeCodECamp
testString: 'assert(fccRegex.test("FrEeCodECamp"), "Your regex should match FrEeCodECamp
");'
- text: يجب أن يتطابق التعبير المعتاد مع FReeCodeCAmp
testString: 'assert(fccRegex.test("FReeCodeCAmp"), "Your regex should match FReeCodeCAmp
");'
```