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 Pattern | Name / Component | Function & Rule |
|---|---|---|
| \u0600-\u06FF | Arabic Main | Basic Arabic alphabet and numbers. |
| \u0750-\u077F | Arabic Supplement | Extended letters. |
| \u08A0-\u08FF | Arabic Extended-A | Additional non-standard Arabic glyphs. |
Frequently Asked Questions
Does this match Arabic diacritics (Harakat)?
Related Regular Expressions
Browse All 40 PatternsData & Formatting
Leading & Trailing Whitespace
Matches beginning and ending spaces, tabs, and newlines for string sanitization.
/^\s+|\s+$/gTest regex
Data & Formatting
Duplicate Consecutive Words
Finds repeated words separated by whitespace like 'the the' or 'is is' using backreferences.
/\b(\w+)\s+\1\b/giTest regex
Data & Formatting
URL Slug Matcher
Matches lowercase alphanumeric strings separated by single hyphens, ideal for SEO permalinks.
/^[a-z0-9]+(?:-[a-z0-9]+)*$/Test regex