Skip to content

Instantly share code, notes, and snippets.

@Humoud
Last active June 2, 2025 01:57
Show Gist options
  • Save Humoud/f40f58cd85c5935a444c to your computer and use it in GitHub Desktop.
Save Humoud/f40f58cd85c5935a444c to your computer and use it in GitHub Desktop.

Revisions

  1. Humoud revised this gist Mar 13, 2016. 1 changed file with 15 additions and 7 deletions.
    22 changes: 15 additions & 7 deletions regex-arabic.md
    Original file line number Diff line number Diff line change
    @@ -3,13 +3,21 @@
    `/[\u0600-\u06ff]|[\u0750-\u077f]|[\ufb50-\ufbc1]|[\ufbd3-\ufd3f]|[\ufd50-\ufd8f]|[\ufd92-\ufdc7]|[\ufe70-\ufefc]|[\uFDF0-\uFDFD]/`

    ## Summary: ##
    Arabic (0600—06FF, 225 characters)
    Arabic Supplement (0750—077F, 48 characters)
    Arabic Extended-A (08A0—08FF, 39 characters)
    Arabic Presentation Forms-A (FB50—FDFF, 608 characters)
    Arabic Presentation Forms-B (FE70—FEFF, 140 characters)
    Rumi Numeral Symbols (10E60—10E7F, 31 characters)
    Arabic Mathematical Alphabetic Symbols (1EE00—1EEFF, 143 characters)
    ``` ruby
    Arabic (0600—06FF, 225 characters)

    Arabic Supplement (0750—077F, 48 characters)

    Arabic Extended-A (08A0—08FF, 39 characters)

    Arabic Presentation Forms-A (FB50FDFF, 608 characters)

    Arabic Presentation Forms-B (FE70FEFF, 140 characters)

    Rumi Numeral Symbols (10E60—10E7F, 31 characters)

    Arabic Mathematical Alphabetic Symbols (1EE00—1EEFF, 143 characters)
    ```

    For more info check this Wiki link to see arabic letters in Unicode:

  2. Humoud created this gist Mar 13, 2016.
    20 changes: 20 additions & 0 deletions regex-arabic.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,20 @@
    ## Detect all Arabic Characters: ##

    `/[\u0600-\u06ff]|[\u0750-\u077f]|[\ufb50-\ufbc1]|[\ufbd3-\ufd3f]|[\ufd50-\ufd8f]|[\ufd92-\ufdc7]|[\ufe70-\ufefc]|[\uFDF0-\uFDFD]/`

    ## Summary: ##
    Arabic (0600—06FF, 225 characters)
    Arabic Supplement (0750—077F, 48 characters)
    Arabic Extended-A (08A0—08FF, 39 characters)
    Arabic Presentation Forms-A (FB50—FDFF, 608 characters)
    Arabic Presentation Forms-B (FE70—FEFF, 140 characters)
    Rumi Numeral Symbols (10E60—10E7F, 31 characters)
    Arabic Mathematical Alphabetic Symbols (1EE00—1EEFF, 143 characters)

    For more info check this Wiki link to see arabic letters in Unicode:

    https://en.wikipedia.org/wiki/Arabic_(Unicode_block)


    ### References:
    http://stackoverflow.com/questions/11323596/regular-expression-for-arabic-language