Andrea Giammarchi (2014-07-16T07:31:38.000Z)
forbes at lindesay.co.uk (2014-07-16T22:35:44.823Z)
expected by specs ... try this ```js r = /\u0020+$/g; p = r.exec(" "); r.lastIndex = 0; q = r.exec(" "); alert(JSON.stringify([p, q])) ``` and you are good to go ... without resetting lastIndex, you can also use `" ".replace(r, 'whatever')` and it's going to work every time. Have a look at these slides to know more about JS RegExp https://github.com/WebReflection/talks/tree/master/BerlinJS