Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9123693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:24:12+00:00 2026-06-17T06:24:12+00:00

According to Mongo documentation it uses PCRE engine, and PCRE support \b and \w

  • 0

According to Mongo documentation it uses PCRE engine, and PCRE support \b and \w for unicode characters, but following RegEx does not match with Unicode strings, Is there any solution or alternative syntax for it?

// in Mongo console:
 db.col.find({word:/\b\pL\b/});

// in PHP
(new Mongo())->db->col->find(['word'=>new MongoRegex('/\b\pL\b/u')]);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:24:14+00:00Added an answer on June 17, 2026 at 6:24 am

    I couldn’t find any documentation on exactly which features MongoDB’s PCRE implementation supports, but if it includes the \pL Unicode character class as well as look-ahead and look-behind assertions, then a Unicode-aware replacement for \b would be:

    (?:(?=\pL)(?<!\pL)|(?!\pL)(?<=\pL))
    

    Basically, (?=\pL)(?<!\pL) matches if the next character is a letter while the previous one is not, whereas (?!\pL)(?<=\pL) conversely matches if the previous character is a letter but the next one is not.

    Of course, this regexp can be simplified a lot if we already know something about what the adjacent characters can be. For example, the Unicode-aware version of \b\pL+\b can be written simply as:

    (?<!\pL)\pL+(?!\pL)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The Meteor Collection Object_Id does not appear to be the Mongo BSON Object_Id. This
According to the C++11 standard, is the following program well-formed and portable C++? int
According to this post , IDEA uses Osmorc to run OSGi frameworks. It, in
According to Hibernate documentation : After observing that arrays cannot be lazy , you
According to the iNES documentation , ROM banks are 16kB. Is this 16000 bytes
According to the official documentation , the KeyDown event on a Windows Forms control
According to connects documentation the session should expire when the browser is closed: By
According to the Quartz 2's documentation RequestsRecovery - if a job requests recovery, and
According to the documentation , the SensorType enum includes a RotationVector value. Which looks
I've read few articles regarding indexing in MongoDb, but have not got idea over

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.