Skip to main content
Data & Formatting · In-Browser Regular Expression Lab

Arabic Regex — Match Arabic Letters, Diacritics & Numbers

Matches Arabic script characters (Unicode block U+0600 to U+06FF) including letters, digits, and diacritics.

Flags:
//gu
Match Found
Load Sample:
Match Inspection & Details4 matches
Match #1:مرحبا
Match #2:بك
Match #3:في
Match #4:كاستوف

Test Samples Verification Matrix

Expected Valid Samples (Should Match)

مرحبا بك في كاستوف Pass
برمجة السيو Pass
أداة المطورين 2026 Pass

Expected Invalid Samples (Must Reject)

Hello World Rejected (Pass)
12345 Rejected (Pass)
TypeScript Rejected (Pass)
Code Implementation Generator
// JavaScript / TypeScript (ES6+)
const pattern = /[\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF]+/gu;
const text = "مرحبا بك في كاستوف";

const isMatch = pattern.test(text);
console.log("Is Match:", isMatch);

if (isMatch) {
  const matches = text.match(pattern);
  console.log("Matches:", matches);
}

Regular Expression Token Breakdown

Captures Arabic Unicode blocks including basic Arabic, Arabic Supplement, and Arabic Extended-A. Each component of the regular expression serves a distinct syntactical purpose as mapped below:

Token PatternName / ComponentFunction & Rule
\u0600-\u06FFArabic MainBasic Arabic alphabet and numbers.
\u0750-\u077FArabic SupplementExtended letters.
\u08A0-\u08FFArabic Extended-AAdditional non-standard Arabic glyphs.

Frequently Asked Questions

Does this match Arabic diacritics (Harakat)?
Yes, the U+0600-U+06FF block contains Fatha, Damma, Kasra, and Sukun.
Browse All 40 Patterns