Code Monkey home page Code Monkey logo

Comments (2)

patch avatar patch commented on May 20, 2024

For compatibility with other Unicode regex engines, I think \b and \B should probably operate on simple word boundaries. What's most important though is that \b should operate on the same level as \w, so if \w matches a Unicode word character then \b should match on the boundary of a word consisting of Unicode word characters, but if \w only matches an ASCII word character then \b should also match on the boundary of a word consisting of ASCII word characters. Default word boundaries could then be implemented as \b{w} and \B{w} as well as extended grapheme cluster boundaries with \b{g}, sentence boundaries with \b{s}, etc.

Details on the \b{…} syntax:
http://unicode.org/reports/tr18/#Default_Grapheme_Clusters

from es-regexp-unicode-character-class-escapes.

mathiasbynens avatar mathiasbynens commented on May 20, 2024

This is not gonna happen as per https://esdiscuss.org/topic/questions-regarding-es6-unicode-regular-expressions#content-5. Closing the issue.

from es-regexp-unicode-character-class-escapes.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.