t1 vs t2

Edit on GitHub

test

Setup

Tests

  • t1

    "Test abc test test abc test...".replace(/([ ])/g, "_")
  • t2

    "Test abc test test abc test...".split(" ").join("_");