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

  • Home
  • SEARCH
  • 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 8568781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:11:11+00:00 2026-06-11T18:11:11+00:00

I developed a javascript function to clean a range of Unicode characters. For example,

  • 0

I developed a javascript function to clean a range of Unicode characters. For example, “ñeóñú a1.txt” => “neonu a1.txt”. For this, I used a regular expression:

 var = new RegExp patternA ("[\\u0300-\\u036F]", "g");
 name = name.replace (patternA,'');

But it does not work properly in IE. If my research is correct, IE does not detect Unicode in the same way. I’m trying to make an equivalent function using the library XRegExp (http://xregexp.com/), which is compatible with all browsers, but I don’t know how to write the Unicode pattern so XRegExp works in IE.

One of the failed attemps:

    XRegExp.replace(name,'\\u0300-\\u036F','');

How can I build this pattern?

  • 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-11T18:11:12+00:00Added an answer on June 11, 2026 at 6:11 pm

    The value provided as the XRegExp.replace method’s second argument should be a regular expression object, not a string. The regex can be built by the XRegExp or the native RegExp constructor. Thus, the following two lines are equivalent:

    name = name.replace(/[\u0300-\u036F]/g, '');
    // Is equivalent to:
    name = XRegExp.replace(name, /[\u0300-\u036F]/g, '');
    

    The following line you wrote, however, is not valid:

    var = new RegExp patternA ("[\\u0300-\\u036F]", "g");

    Instead, it should be:

    var patternA = new RegExp ("[\\u0300-\\u036F]", "g");

    I don’t know if that is the source of your problem, but perhaps. For the record, IE’s Unicode support is as good or better than other browsers.

    XRegExp can let you identify your block by name, rather than using magic numbers. XRegExp('[\\u0300-\\u036F]') and XRegExp('\\p{InCombiningDiacriticalMarks}') are exactly equivalent. However, the marks in that block are a small subset of all combining marks. You might actually want to match something like XRegExp('\\p{M}'). However, note that simply removing marks like you’re doing is not a safe way to remove diacritics. Generally, what you’re trying to do is a bad idea and should be avoided, since it will often lead to wrong or unintelligible results.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I recently developed a web app which used the JavaScript window.location property to redirect
I have this small tabbed system developed in PHP/JavaScript. For form submissioni, I bind
I developed some javascript enhanced pages that run fine on recent Firefox and Safari.
I have one project with is developed in Php and javascript. How to open
I've developed a system that polls a server and injects the response JavaScript into
how to use a swf upload control in javascript for a page developed in
I've developed a print mechanism for an intranet application running over HTTPS. Using javascript
I want to add printing to my Javascript web application. The application is developed
https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Object/defineProperty states: configurable : True if and only if the type of this property
I have developed a Wordpress site that loads pages dynamically using the .load function.

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.