About 13,300,000 results
Open links in new tab
  1. javascript - How do I split a string, breaking at a particular ...

    8 split() method in JavaScript is used to convert a string to an array. It takes one optional argument, as a character, on which to split. In your case (~). If splitOn is skipped, it will simply put string as it is on …

  2. javascript - How do I split a string into an array of characters ...

    9 The split () method in javascript accepts two parameters: a separator and a limit. The separator specifies the character to use for splitting the string. If you don't specify a separator, the entire string …

  3. How do I split a string with multiple separators in JavaScript?

    Mar 16, 2009 · How do I split a string with multiple separators in JavaScript? I'm trying to split on both commas and spaces, but AFAIK JavaScript's split () function only supports one separator.

  4. javascript - How to use split? - Stack Overflow

    Just curious, what did you search for that you didn't find any documentation? I searched on Google for both "javascript split" and "jquery split" and the first result in both cases was the location I linked to.

  5. javascript - How to split a string by white space or comma? - Stack ...

    input.split(/[ ,]+/); This particular regex splits on a sequence of one or more commas or spaces, so that e.g. multiple consecutive spaces or a comma+space sequence do not produce empty elements in …

  6. javascript - How to split string with newline ('\n') in Node? - Stack ...

    Note that split ting returns the new array, rather than just assigning it to the original string. You need to explicitly store it in a variable.

  7. javascript - Split a string straight into variables - Stack Overflow

    var array = str.split('-'); var a = array[0]; var b = array[1]; var c = array[2]; Because for the code that I’m writing at the moment such a method would be a real pain, I’m creating 20 variables from 7 different …

  8. javascript - How can I split a string into segments of n characters ...

    20 Building on the previous answers to this question; the following function will split a string (str) n-number (size) of characters.

  9. javascript - JS regex to split by line - Stack Overflow

    Unicode Compliant Line Splitting Unicode® Technical Standard #18 defines what constitutes line boundaries. That same section also gives a regular expression to match all line boundaries. Using …

  10. javascript - Split string into array - Stack Overflow

    Use the .split() method. When specifying an empty string as the separator, the split() method will return an array with one element per character.