remove regex flags

they shouldn't make a difference, but it's the only diff I can find between working jsfiddle (http://jsfiddle.net/dxmLe4kj/) and this