some javascript regex stuff not done