★ wanayoo — archive 1999 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp/unicodeNouvelle recherche | Portail wanayoo

Apply your JS skills to key Mozilla projects as an MDN Fellow! http://mzl.la/MDNFellowship

mozilla
Your Search Results

    RegExp.prototype.unicode

    This is an experimental technology, part of the ECMAScript 6 (Harmony) proposal.
    Because this technology's specification has not stabilized, check the compatibility table for usage in various browsers. Also note that the syntax and behavior of an experimental technology is subject to change in future version of browsers as the spec changes.

    Summary

    The unicode property indicates whether or not the "u" flag is used with the regular expression. unicode is a read-only property of an individual regular expression instance.

    Property attributes of RegExp.prototype.unicode
    Writable no
    Enumerable no
    Configurable yes

    Description

    The value of unicode is a Boolean and true if the "u" flag was used; otherwise, false. The "u" flag enables various Unicode-related features. With the "u" flag, any Unicode code point escapes will be interpreted as such, for example.

    You cannot change this property directly.

    Examples

    Example: Using the unicode property

    var regex = new RegExp('\u{61}', 'u');
    
    console.log(regex.unicode); // true
    

    Specifications

    Specification Status Comment
    ECMAScript 6 (ECMA-262)
    The definition of 'RegExp.prototype.unicode' in that specification.
    Draft Initial definition.

    Browser compatibility

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support Not supported Not supported Not supported Not supported Not supported
    Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support Not supported Not supported Not supported Not supported Not supported Not supported

    See also

    Document Tags and Contributors

    Contributors to this page: fscholz
    Last updated by: fscholz,