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 3934522
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T23:43:31+00:00 2026-05-19T23:43:31+00:00

Chrome 9.0.597.83 beta on Ubuntu 10.10: As you can see, the pattern doesn’t work

  • 0

Chrome 9.0.597.83 beta on Ubuntu 10.10:

enter image description here

As you can see, the pattern doesn’t work when passed in as a string, but works fine when passed in as a RegExp object. Why is this? I need to be able to pass it in as a string so that I can manipulate it before performing the match.


Note: I just posted a question very similar to this… and thought I was doing something wrong and deleted the question. Then when I tried something slightly different, I got the problem again.

  • 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-05-19T23:43:32+00:00Added an answer on May 19, 2026 at 11:43 pm

    The problem is with the backslash \. This is escaping the W character. In a string, \W evaluates to W. You need to escape the backslash:

    "e c".match(new RegExp('(?:^|\\W)c(?:\\W|$)'))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Chrome, Safari, Opera and IE work fine. But Firefox fails to load images. This
Chrome 11 supports voice recording by <intput type=text x-webkit-speech /> But what's passed to
I am using Windows XP SP2 and Chrome (version 9.0.597.19) but every time I
In Chrome this is possible, but I don't find a way to do it
In Chrome, you can set breakpoints in your scripts via F12 . As it's
On Safari and Chrome, I won't be able to see flush() updates updating live
Chrome, Opra and IE all show the first alert, but do not show any
A Chrome extension I built a few months ago has been working fine until
Google Chrome is throwing Uncaught TypeError: Cannot set property 'isDown' of undefined but it
Google chrome doesn't behave the same as other browsers when encountering this nugget: <?php

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.