Friday, March 30, 2012

Twitter / diyism (1) RT @ralphholzmann: TIL in JS, if you split on a regex with a capture group, it gets added to the result. "foo.bar".split(/(\.)/g); // ["foo", ".", "bar"]

Twitter / diyism (1) RT @ralphholzmann: TIL in JS, if you split on a regex with a capture group, it gets added to the result. "foo.bar".split(/(\.)/g); // ["foo", ".", "bar"]


RT @ralphholzmann: TIL in JS, if you split on a regex with a capture group, it gets added to the result. "foo.bar".split(/(\.)/g); // ["foo", ".", "bar"]

Posted: 29 Mar 2012 06:55 PM PDT

RT @ralphholzmann: TIL in JS, if you split on a regex with a capture group, it gets added to the result. "foo.bar".split(/(\.)/g); // ["foo", ".", "bar"]

No comments:

Post a Comment