Fixed ruby regex. should work same as JS