split - behavoir

Discussion in 'Javascript' started by okey, Apr 1, 2010.

  1. okey

    okey Guest

    for an input string "| some text"

    parts = str.split(/\|/) results in different answers

    ie6 some text , null
    ff null, some text

    I'm going to regx this, but was wondering if anyone had good way to
    split this consistently in both browsers. ie6 support is required.
    okey, Apr 1, 2010
    #1
    1. Advertising

  2. okey

    Joe Nine Guest

    okey wrote:
    > for an input string "| some text"
    >
    > parts = str.split(/\|/) results in different answers
    >
    > ie6 some text , null
    > ff null, some text
    >
    > I'm going to regx this, but was wondering if anyone had good way to
    > split this consistently in both browsers. ie6 support is required.


    str.split("|");
    Joe Nine, Apr 1, 2010
    #2
    1. Advertising

  3. okey

    okey Guest

    You have got to be @#$@#$ me! Thanks.
    okey, Apr 1, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Markus Franz

    Processes with strange behavoir

    Markus Franz, Apr 4, 2004, in forum: Python
    Replies:
    2
    Views:
    326
    Peter Otten
    Apr 4, 2004
  2. Joachim Schmitz

    sscanf behavoir

    Joachim Schmitz, Apr 19, 2007, in forum: C Programming
    Replies:
    7
    Views:
    430
    Gunvant Patil
    Apr 20, 2007
  3. Replies:
    5
    Views:
    126
    YANAGAWA Kazuhisa
    Mar 8, 2006
  4. Sy Ys

    BackgrounDRb behavoir

    Sy Ys, May 27, 2007, in forum: Ruby
    Replies:
    1
    Views:
    94
    Ezra Zygmuntowicz
    May 27, 2007
  5. surf

    perl polymorphic behavoir ?

    surf, Feb 7, 2006, in forum: Perl Misc
    Replies:
    3
    Views:
    92
    A. Sinan Unur
    Feb 7, 2006
Loading...

Share This Page