Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The HTML5 <code>pattern</code> attribute follows JavaScript regular expression syntax, which makes things rather awkward. You cannot test character properties, for example. Instead, you need to list down the allowed characters or ranges of characters.</p> <p>Using the normative <a href="http://www.unicode.org/Public/UNIDATA/Scripts.txt" rel="nofollow">Scripts.txt</a> file (by the Unicode Consortium), which defines the script (writing system) of all characters, I constructed the following:</p> <pre><code>pattern= "[a-zA-Z0-9-_. \ \u0620-\u063F\u0641-\u064A\u066E-\u066F\u0671-\u06D3\u06D5\ \u06E5-\u06E6\u06EE-\u06EF\u06FA-\u06FC\u06FF\u0750-\u077F\ \u08A0\u08A2-\u08AC\uFB50-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\ \uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]{1,30}" </code></pre> <p>Starting from the set of all characters with script defined to be Arabic, I picked up those that are declared as letters (General Category <code>Lo</code> or <code>Lm</code>), and then omitted those beyond BMP, the Basic Multilingual Plane.</p> <p>Characters outside BMP are used very rarely, and to represent them in JavaScript syntax, you would need to either include the characters themselves or use two <code>\u</code> notations per character (one for each component of a surrogate pair). This does not sound realistic.</p> <p>This is of course a “hardwired” solution: it may need updates if new Arabic letters are added to Unicode or the script of a character is changed from or to Arabic (which is highly unlikely). But I don’t expect to see new Arabic letters added to BMP during my lifetime.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload