Javascript Regex Trouble In Internet Explorer
I am trying to split a string in Javascript using a Regular Expression. My code is as follows: var status = 'This is a test http://yfrog.com/5y6eruj'; var regexp = /(http:\/\/y
Solution 1:
I would not use "split" for this, because it's buggy: http://blog.stevenlevithan.com/archives/cross-browser-split
Try
var matchParts = regexp.exec(status);
instead. You may have to tinker with the regex a bit (I'll try it and update).
edit If you add (.*)
to the beginning of the regular expression, you'll pick up the leading text too.
Post a Comment for "Javascript Regex Trouble In Internet Explorer"