Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The charset doesn't matter. The allowed characters matters more. Check the <a href="http://www.w3.org/TR/CSS2/syndata.html#characters" rel="noreferrer">CSS specification</a>. Here's a cite of relevance:</p> <blockquote> <p>In CSS, identifiers (including element names, classes, and IDs in <a href="http://www.w3.org/TR/CSS2/selector.html" rel="noreferrer">selectors</a>) can contain only the characters <code>[a-zA-Z0-9]</code> and ISO 10646 characters <code>U+00A1</code> and higher, plus the hyphen (<code>-</code>) and the underscore (<code>_</code>); they cannot start with a digit, or a hyphen followed by a digit. Identifiers can also contain escaped characters and any ISO 10646 character as a numeric code (see next item). For instance, the identifier <code>"B&amp;W?"</code> may be written as <code>"B\&amp;W\?"</code> or <code>"B\26 W\3F"</code>.</p> </blockquote> <p><strong>Update</strong>: As to the regex question, you can find the grammar <a href="http://www.w3.org/TR/CSS21/grammar.html#scanner" rel="noreferrer">here</a>:</p> <pre><code>ident -?{nmstart}{nmchar}* </code></pre> <p>Which contains of the parts:</p> <pre><code>nmstart [_a-z]|{nonascii}|{escape} nmchar [_a-z0-9-]|{nonascii}|{escape} nonascii [\240-\377] escape {unicode}|\\[^\r\n\f0-9a-f] unicode \\{h}{1,6}(\r\n|[ \t\r\n\f])? h [0-9a-f] </code></pre> <p>This can be translated to a Java regex as follows (I only added parentheses to parts containing the OR and escaped the backslashes):</p> <pre><code>String h = "[0-9a-f]"; String unicode = "\\\\{h}{1,6}(\\r\\n|[ \\t\\r\\n\\f])?".replace("{h}", h); String escape = "({unicode}|\\\\[^\\r\\n\\f0-9a-f])".replace("{unicode}", unicode); String nonascii = "[\\240-\\377]"; String nmchar = "([_a-z0-9-]|{nonascii}|{escape})".replace("{nonascii}", nonascii).replace("{escape}", escape); String nmstart = "([_a-z]|{nonascii}|{escape})".replace("{nonascii}", nonascii).replace("{escape}", escape); String ident = "-?{nmstart}{nmchar}*".replace("{nmstart}", nmstart).replace("{nmchar}", nmchar); System.out.println(ident); // The full regex. </code></pre> <p><strong>Update 2</strong>: oh, you're more a PHP'er, well I think you can figure how/where to do <code>str_replace</code>? </p>
    singulars
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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