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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:43:04+00:00 2026-05-21T02:43:04+00:00

// alerts -> a,b,c,d // which is correct window.alert(a b c d.split(/[\u000A-\u000D\u2028\u2029\u0009\u0020\u00A0\uFEFF]+/g)); However, this

  • 0
// alerts -> a,b,c,d
// which is correct
window.alert("a b c d".split(/[\u000A-\u000D\u2028\u2029\u0009\u0020\u00A0\uFEFF]+/g));

However, this isn’t:

// alerts -> ,a,b,c,d,
// which is not what we need
// as you can see, there is an extra space
// in the front and end of the array
// it is supposed to alert -> a,b,c,d
// just like our first example

window.alert("   a b c d   ".split(/[\u000A-\u000D\u2028\u2029\u0009\u0020\u00A0\uFEFF]+/g));

Any ideas guys?

  • 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-21T02:43:05+00:00Added an answer on May 21, 2026 at 2:43 am

    You can always match the inverse of that set instead of splitting.

    "   a b c d   ".match(/[^\u000A-\u000D\u2028\u2029\u0009\u0020\u00A0\uFEFF]+/g)
    

    produces ["a", "b", "c", "d"].

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

Sidebar

Related Questions

Of these two, which is correct? jQuery('someclass').click(function() { alert(I've been clicked!); }); or jQuery('someclass').each().click(function()
I have an application in which I have to show the alerts for user
i am working on app which deals with proximity alerts. I can add proximity
My site has an input box, which has a onkeydown event that merely alerts
I have a startActivity which shows an alert dialog until my downloading and parsing
I have a php page on which I show a jQuery alert when a
I want to read the message which is there in Alert. Example: If a
I have a link to a page which invokes the 'Sexy Alert Box' script
I need to display an alert box in other than English language for which
I am using Squeeze Box to access a PHP file which prints an alert

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.